Trait PenMethods

Source
pub trait PenMethods: GDIObjectMethods {
    // Provided methods
    fn get_colour(&self) -> Colour { ... }
    fn get_dashes(&self, dashes: *mut c_void) -> c_int { ... }
    fn get_stipple(&self) -> Option<BitmapIsOwned<false>> { ... }
    fn get_width(&self) -> c_int { ... }
    fn is_ok(&self) -> bool { ... }
    fn is_non_transparent(&self) -> bool { ... }
    fn is_transparent(&self) -> bool { ... }
    fn set_colour<C: ColourMethods>(&self, colour: &C) { ... }
    fn set_dashes(&self, n: c_int, dash: *const c_void) { ... }
    fn set_stipple<B: BitmapMethods>(&self, stipple: &B) { ... }
    fn set_width(&self, width: c_int) { ... }
}
Expand description

This trait represents C++ wxPen class’s methods and inheritance.

See PenIsOwned documentation for the class usage.

Provided Methods§

Source

fn get_colour(&self) -> Colour

Returns a reference to the pen colour.

See C++ wxPen::GetColour()’s documentation.

Source

fn get_dashes(&self, dashes: *mut c_void) -> c_int

Gets an array of dashes (defined as char in X, DWORD under Windows).

See C++ wxPen::GetDashes()’s documentation.

Source

fn get_stipple(&self) -> Option<BitmapIsOwned<false>>

Gets a pointer to the stipple bitmap.

See C++ wxPen::GetStipple()’s documentation.

Source

fn get_width(&self) -> c_int

Returns the pen width.

See C++ wxPen::GetWidth()’s documentation.

Source

fn is_ok(&self) -> bool

Returns true if the pen is initialised.

See C++ wxPen::IsOk()’s documentation.

Source

fn is_non_transparent(&self) -> bool

Returns true if the pen is a valid non-transparent pen.

See C++ wxPen::IsNonTransparent()’s documentation.

Source

fn is_transparent(&self) -> bool

Returns true if the pen is transparent.

See C++ wxPen::IsTransparent()’s documentation.

Source

fn set_colour<C: ColourMethods>(&self, colour: &C)

The pen’s colour is changed to the given colour.

See C++ wxPen::SetColour()’s documentation.

Source

fn set_dashes(&self, n: c_int, dash: *const c_void)

Associates an array of dash values (defined as char in X, DWORD under Windows) with the pen.

See C++ wxPen::SetDashes()’s documentation.

Source

fn set_stipple<B: BitmapMethods>(&self, stipple: &B)

Sets the bitmap for stippling.

See C++ wxPen::SetStipple()’s documentation.

Source

fn set_width(&self, width: c_int)

Sets the pen width.

See C++ wxPen::SetWidth()’s documentation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<const OWNED: bool> PenMethods for PenIsOwned<OWNED>