Struct CompositionBrush
pub struct CompositionBrush(/* private fields */);Expand description
Texture brush class.
Implements a textured brush used to fill areas with patterns.
Implementations§
§impl CompositionBrush
impl CompositionBrush
Methods from Deref<Target = Brush>§
pub fn get_modulate_color(&self) -> Result<ColorRGBA, Error>
pub fn get_modulate_color(&self) -> Result<ColorRGBA, Error>
pub fn set_modulate_color(&self, value: ColorRGBA) -> Result<(), Error>
pub fn set_modulate_color(&self, value: ColorRGBA) -> Result<(), Error>
pub fn get_horizontal_tiling(&self) -> Result<f32, Error>
pub fn get_horizontal_tiling(&self) -> Result<f32, Error>
pub fn set_horizontal_tiling(&self, value: f32) -> Result<(), Error>
pub fn set_horizontal_tiling(&self, value: f32) -> Result<(), Error>
pub fn get_vertical_tiling(&self) -> Result<f32, Error>
pub fn get_vertical_tiling(&self) -> Result<f32, Error>
pub fn set_vertical_tiling(&self, value: f32) -> Result<(), Error>
pub fn set_vertical_tiling(&self, value: f32) -> Result<(), Error>
Methods from Deref<Target = Resource>§
pub fn get_name(&self) -> Result<KanziString, Error>
pub fn get_name(&self) -> Result<KanziString, Error>
Gets the resource name.
pub fn get_url(&self) -> Result<KanziString, Error>
pub fn get_url(&self) -> Result<KanziString, Error>
Gets the resource URL. Note that the URL is not necessarily in URL form if resource has been just created.
§Returns
URL string.
Methods from Deref<Target = Object>§
pub fn as_ptr(&self) -> *mut ObjectWrapper
pub fn as_wrapper(&self) -> &ObjectWrapper
pub fn as_object(&self) -> &Object
pub fn as_object(&self) -> &Object
Represents any type inheriting from Object as &Object.
This is useful for comparisions when PartialEq traits failed to compare objects of
different types.
let child = screen.get_child(0)?;
let parent = child.get_parent()?.into_error(ErrorKind::ObjectNotFound)?;
// assert_eq!(screen, parent); // <- Fails to compile!
assert_eq!(screen.as_object(), parent.as_object());pub fn get_native(&self) -> Result<NonNull<c_void>, Error>
pub fn get_native(&self) -> Result<NonNull<c_void>, Error>
Gets a pointer to the backing C++ instance.
pub fn get_property<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<<T as VariantConstraint>::RetArg, Error>where
T: PropertyTypeConstraint,
pub fn get_property<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<<T as VariantConstraint>::RetArg, Error>where
T: PropertyTypeConstraint,
Returns the current value of a property disregarding modifiers.
Base value is affected by the following inputs where the highest entry in the list determines the base value:
- Local value set with setProperty or loaded from kzb
- Value set by a style affecting the property.
- Value defined by class metadata.
Modifiers are not applied, the highest-priority base value is returned.
If no inputs to the property value can be established the system returns the value default value from property type metadata.
§Arguments
property_type- The property type identifying the property to retrieve.
§Returns
The evaluated property value.
pub fn get_optional_property<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<Option<<T as VariantConstraint>::RetArg>, Error>where
T: PropertyTypeConstraint,
pub fn get_optional_property<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<Option<<T as VariantConstraint>::RetArg>, Error>where
T: PropertyTypeConstraint,
Returns the current value of a property disregarding modifiers, but does not default to the value in property metadata if there are no inputs to the property value.
If there is no value sources, None is returned.
If no inputs to the property value can be established the system returns the value default value from property type metadata.
§Arguments
property_type- The property type identifying the property to retrieve.
§Returns
The evaluated property value.
pub fn set_property<T>(
&self,
property_type: &PropertyType<T>,
value: <T as VariantConstraint>::DataArg<'_>,
) -> Result<(), Error>where
T: PropertyTypeConstraint,
pub fn set_property<T>(
&self,
property_type: &PropertyType<T>,
value: <T as VariantConstraint>::DataArg<'_>,
) -> Result<(), Error>where
T: PropertyTypeConstraint,
Sets the local value of a property type.
pub fn has_value<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<bool, Error>where
T: PropertyTypeConstraint,
pub fn has_value<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<bool, Error>where
T: PropertyTypeConstraint,
Evaluates whether there are any inputs into the property value. Both value sources and modifiers are taken into account.
§Returns
Returns true if there are inputs into the property value, false otherwise.
pub fn remove_local_value<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<(), Error>where
T: PropertyTypeConstraint,
pub fn remove_local_value<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<(), Error>where
T: PropertyTypeConstraint,
Removes the local value associated with the property.
pub fn get_metaclass(&self) -> Result<Metaclass, Error>
pub fn get_metaclass(&self) -> Result<Metaclass, Error>
Returns the metaclass of the dynamic type of the object.
pub fn get_domain(&self) -> Result<Domain, Error>
pub fn get_domain(&self) -> Result<Domain, Error>
Returns the domain the object belongs to.
pub fn set_flag_keep_during_patching<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<(), Error>where
T: PropertyTypeConstraint,
pub fn set_flag_keep_during_patching<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<(), Error>where
T: PropertyTypeConstraint,
Sets the flag to indicate that the property was loaded from KZB.
pub fn debug_string(&self) -> Result<String, Error>
pub fn debug_string(&self) -> Result<String, Error>
Builds a string representation of the object intended for debugging purposes.
Trait Implementations§
§impl Clone for CompositionBrush
impl Clone for CompositionBrush
§fn clone(&self) -> CompositionBrush
fn clone(&self) -> CompositionBrush
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for CompositionBrush
impl Debug for CompositionBrush
§impl Deref for CompositionBrush
impl Deref for CompositionBrush
§type Target = ContentBrush
type Target = ContentBrush
§fn deref(&self) -> &<CompositionBrush as Deref>::Target
fn deref(&self) -> &<CompositionBrush as Deref>::Target
§impl Inheritable for CompositionBrush
impl Inheritable for CompositionBrush
§unsafe fn downcast_unchecked<T>(self) -> Twhere
T: Inherits<Self>,
unsafe fn downcast_unchecked<T>(self) -> Twhere
T: Inherits<Self>,
§unsafe fn downcast_unchecked_ref<T>(&self) -> &Twhere
T: Inherits<Self>,
unsafe fn downcast_unchecked_ref<T>(&self) -> &Twhere
T: Inherits<Self>,
§impl Inherits<Brush> for CompositionBrush
impl Inherits<Brush> for CompositionBrush
fn upcast(self) -> Base
fn upcast_ref(&self) -> &Base
§impl Inherits<ContentBrush> for CompositionBrush
impl Inherits<ContentBrush> for CompositionBrush
fn upcast(self) -> Base
fn upcast_ref(&self) -> &Base
§impl Inherits<Object> for CompositionBrush
impl Inherits<Object> for CompositionBrush
fn upcast(self) -> Base
fn upcast_ref(&self) -> &Base
§impl Inherits<Resource> for CompositionBrush
impl Inherits<Resource> for CompositionBrush
fn upcast(self) -> Base
fn upcast_ref(&self) -> &Base
§impl MetaclassConstraint for CompositionBrush
impl MetaclassConstraint for CompositionBrush
§fn get_static_metaclass() -> &'static Metaclass
fn get_static_metaclass() -> &'static Metaclass
§impl ObjectConstraint for CompositionBrush
impl ObjectConstraint for CompositionBrush
§fn downcast<T>(self) -> Result<Option<T>, Error>where
T: MetaInherits<Self>,
fn downcast<T>(self) -> Result<Option<T>, Error>where
T: MetaInherits<Self>,
§fn downcast_ref<T>(&self) -> Result<Option<&T>, Error>where
T: MetaInherits<Self>,
fn downcast_ref<T>(&self) -> Result<Option<&T>, Error>where
T: MetaInherits<Self>,
§fn is_a<T>(&self) -> Result<bool, Error>where
T: MetaInherits<Self>,
fn is_a<T>(&self) -> Result<bool, Error>where
T: MetaInherits<Self>,
fn downgrade(self) -> Weak<Self>
fn downgrade_ref(&self) -> Weak<Self>
fn lock(self) -> ThreadObject<Self>
fn lock_ref(&self) -> ThreadObject<Self>
§impl<T> PartialEq<T> for CompositionBrushwhere
T: ObjectConstraint,
impl<T> PartialEq<T> for CompositionBrushwhere
T: ObjectConstraint,
§impl<T> PartialEq<Weak<T>> for CompositionBrushwhere
T: ObjectConstraint,
impl<T> PartialEq<Weak<T>> for CompositionBrushwhere
T: ObjectConstraint,
impl Eq for CompositionBrush
Auto Trait Implementations§
impl Freeze for CompositionBrush
impl RefUnwindSafe for CompositionBrush
impl !Send for CompositionBrush
impl !Sync for CompositionBrush
impl Unpin for CompositionBrush
impl UnwindSafe for CompositionBrush
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)