pub struct SchGraphicalBase {
pub base: SchPrimitiveBase,
pub location_x: i32,
pub location_y: i32,
pub color: i32,
pub area_color: i32,
}Expand description
Common fields for graphical schematic objects (extends SchPrimitiveBase).
Fields§
§base: SchPrimitiveBaseBase primitive fields.
location_x: i32Location of the object.
location_y: i32§color: i32Color (Win32 COLORREF).
area_color: i32Area/fill color (Win32 COLORREF).
Implementations§
Source§impl SchGraphicalBase
impl SchGraphicalBase
Sourcepub const COLOR_BLUE: i32 = 128
pub const COLOR_BLUE: i32 = 128
Standard colors from Altium schematics (Win32 COLORREF format: 0xBBGGRR).
pub const COLOR_RED: i32 = 8388608
pub const COLOR_LIGHT_CYAN: i32 = 11599871
Sourcepub fn new_graphical() -> Self
pub fn new_graphical() -> Self
Create a new SchGraphicalBase with default colors for graphical objects (blue).
Use this for components, junctions, ports, and other graphical primitives.
Sourcepub fn new_wire_or_text() -> Self
pub fn new_wire_or_text() -> Self
Create a new SchGraphicalBase with default colors for wires and text (red).
Use this for wires, labels, and text objects.
Sourcepub fn import_from_params(params: &ParameterCollection) -> Self
pub fn import_from_params(params: &ParameterCollection) -> Self
Import graphical fields from parameters.
Sourcepub fn export_to_params(&self, params: &mut ParameterCollection)
pub fn export_to_params(&self, params: &mut ParameterCollection)
Export graphical fields to parameters.
Sourcepub fn owner_index(&self) -> i32
pub fn owner_index(&self) -> i32
Get the owner index (delegates to base).
Sourcepub fn set_owner_index(&mut self, index: i32)
pub fn set_owner_index(&mut self, index: i32)
Set the owner index (delegates to base).
Trait Implementations§
Source§impl Clone for SchGraphicalBase
impl Clone for SchGraphicalBase
Source§fn clone(&self) -> SchGraphicalBase
fn clone(&self) -> SchGraphicalBase
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SchGraphicalBase
impl Debug for SchGraphicalBase
Source§impl Default for SchGraphicalBase
impl Default for SchGraphicalBase
Source§fn default() -> SchGraphicalBase
fn default() -> SchGraphicalBase
Returns the “default value” for a type. Read more
Source§impl FromParams for SchGraphicalBase
impl FromParams for SchGraphicalBase
Source§fn from_params(params: &ParameterCollection) -> Result<Self>
fn from_params(params: &ParameterCollection) -> Result<Self>
Parse this type from a parameter collection.
Source§fn from_params_preserving(
params: &ParameterCollection,
) -> Result<(Self, UnknownFields)>
fn from_params_preserving( params: &ParameterCollection, ) -> Result<(Self, UnknownFields)>
Parse this type and collect unknown parameters for non-destructive editing.
Source§impl ToParams for SchGraphicalBase
impl ToParams for SchGraphicalBase
Source§fn append_to_params(&self, params: &mut ParameterCollection)
fn append_to_params(&self, params: &mut ParameterCollection)
Append this type’s parameters to an existing collection. Read more
Source§fn to_params(&self) -> ParameterCollection
fn to_params(&self) -> ParameterCollection
Export this type to a new parameter collection.
Auto Trait Implementations§
impl Freeze for SchGraphicalBase
impl RefUnwindSafe for SchGraphicalBase
impl Send for SchGraphicalBase
impl Sync for SchGraphicalBase
impl Unpin for SchGraphicalBase
impl UnwindSafe for SchGraphicalBase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more