#[repr(C)]
pub struct PixmapFragment { /* private fields */ }
Expand description

This class is used in conjunction with the QPainter::drawPixmapFragments() function to specify how a pixmap, or sub-rect of a pixmap, is drawn.

C++ class: QPainter::PixmapFragment.

C++ documentation:

This class is used in conjunction with the QPainter::drawPixmapFragments() function to specify how a pixmap, or sub-rect of a pixmap, is drawn.

The sourceLeft, sourceTop, width and height variables are used as a source rectangle within the pixmap passed into the QPainter::drawPixmapFragments() function. The variables x, y, width and height are used to calculate the target rectangle that is drawn. x and y denotes the center of the target rectangle. The width and height in the target rectangle is scaled by the scaleX and scaleY values. The resulting target rectangle is then rotated rotation degrees around the x, y center point.

Implementations§

source§

impl PixmapFragment

source

pub unsafe fn copy_from( &self, other: impl CastInto<Ref<PixmapFragment>> ) -> Ref<PixmapFragment>

This class is used in conjunction with the QPainter::drawPixmapFragments() function to specify how a pixmap, or sub-rect of a pixmap, is drawn.

Calls C++ function: QPainter::PixmapFragment& QPainter::PixmapFragment::operator=(const QPainter::PixmapFragment& other).

C++ documentation:

This class is used in conjunction with the QPainter::drawPixmapFragments() function to specify how a pixmap, or sub-rect of a pixmap, is drawn.

The sourceLeft, sourceTop, width and height variables are used as a source rectangle within the pixmap passed into the QPainter::drawPixmapFragments() function. The variables x, y, width and height are used to calculate the target rectangle that is drawn. x and y denotes the center of the target rectangle. The width and height in the target rectangle is scaled by the scaleX and scaleY values. The resulting target rectangle is then rotated rotation degrees around the x, y center point.

source

pub unsafe fn create_6a( pos: impl CastInto<Ref<QPointF>>, source_rect: impl CastInto<Ref<QRectF>>, scale_x: c_double, scale_y: c_double, rotation: c_double, opacity: c_double ) -> CppBox<PixmapFragment>

This is a convenience function that returns a QPainter::PixmapFragment that is initialized with the pos, sourceRect, scaleX, scaleY, rotation, opacity parameters.

Calls C++ function: static QPainter::PixmapFragment QPainter::PixmapFragment::create(const QPointF& pos, const QRectF& sourceRect, double scaleX = …, double scaleY = …, double rotation = …, double opacity = …).

C++ documentation:

This is a convenience function that returns a QPainter::PixmapFragment that is initialized with the pos, sourceRect, scaleX, scaleY, rotation, opacity parameters.

This function was introduced in Qt 4.7.

source

pub unsafe fn create_5a( pos: impl CastInto<Ref<QPointF>>, source_rect: impl CastInto<Ref<QRectF>>, scale_x: c_double, scale_y: c_double, rotation: c_double ) -> CppBox<PixmapFragment>

This is a convenience function that returns a QPainter::PixmapFragment that is initialized with the pos, sourceRect, scaleX, scaleY, rotation, opacity parameters.

Calls C++ function: static QPainter::PixmapFragment QPainter::PixmapFragment::create(const QPointF& pos, const QRectF& sourceRect, double scaleX = …, double scaleY = …, double rotation = …).

C++ documentation:

This is a convenience function that returns a QPainter::PixmapFragment that is initialized with the pos, sourceRect, scaleX, scaleY, rotation, opacity parameters.

This function was introduced in Qt 4.7.

source

pub unsafe fn create_4a( pos: impl CastInto<Ref<QPointF>>, source_rect: impl CastInto<Ref<QRectF>>, scale_x: c_double, scale_y: c_double ) -> CppBox<PixmapFragment>

This is a convenience function that returns a QPainter::PixmapFragment that is initialized with the pos, sourceRect, scaleX, scaleY, rotation, opacity parameters.

Calls C++ function: static QPainter::PixmapFragment QPainter::PixmapFragment::create(const QPointF& pos, const QRectF& sourceRect, double scaleX = …, double scaleY = …).

C++ documentation:

This is a convenience function that returns a QPainter::PixmapFragment that is initialized with the pos, sourceRect, scaleX, scaleY, rotation, opacity parameters.

This function was introduced in Qt 4.7.

source

pub unsafe fn create_3a( pos: impl CastInto<Ref<QPointF>>, source_rect: impl CastInto<Ref<QRectF>>, scale_x: c_double ) -> CppBox<PixmapFragment>

This is a convenience function that returns a QPainter::PixmapFragment that is initialized with the pos, sourceRect, scaleX, scaleY, rotation, opacity parameters.

Calls C++ function: static QPainter::PixmapFragment QPainter::PixmapFragment::create(const QPointF& pos, const QRectF& sourceRect, double scaleX = …).

C++ documentation:

This is a convenience function that returns a QPainter::PixmapFragment that is initialized with the pos, sourceRect, scaleX, scaleY, rotation, opacity parameters.

This function was introduced in Qt 4.7.

source

pub unsafe fn create_2a( pos: impl CastInto<Ref<QPointF>>, source_rect: impl CastInto<Ref<QRectF>> ) -> CppBox<PixmapFragment>

This is a convenience function that returns a QPainter::PixmapFragment that is initialized with the pos, sourceRect, scaleX, scaleY, rotation, opacity parameters.

Calls C++ function: static QPainter::PixmapFragment QPainter::PixmapFragment::create(const QPointF& pos, const QRectF& sourceRect).

C++ documentation:

This is a convenience function that returns a QPainter::PixmapFragment that is initialized with the pos, sourceRect, scaleX, scaleY, rotation, opacity parameters.

This function was introduced in Qt 4.7.

source

pub unsafe fn height(&self) -> c_double

Returns the value of the height field.

source

pub unsafe fn new() -> CppBox<PixmapFragment>

This class is used in conjunction with the QPainter::drawPixmapFragments() function to specify how a pixmap, or sub-rect of a pixmap, is drawn.

Calls C++ function: [constructor] void QPainter::PixmapFragment::PixmapFragment().

C++ documentation:

This class is used in conjunction with the QPainter::drawPixmapFragments() function to specify how a pixmap, or sub-rect of a pixmap, is drawn.

The sourceLeft, sourceTop, width and height variables are used as a source rectangle within the pixmap passed into the QPainter::drawPixmapFragments() function. The variables x, y, width and height are used to calculate the target rectangle that is drawn. x and y denotes the center of the target rectangle. The width and height in the target rectangle is scaled by the scaleX and scaleY values. The resulting target rectangle is then rotated rotation degrees around the x, y center point.

source

pub unsafe fn new_copy( other: impl CastInto<Ref<PixmapFragment>> ) -> CppBox<PixmapFragment>

This class is used in conjunction with the QPainter::drawPixmapFragments() function to specify how a pixmap, or sub-rect of a pixmap, is drawn.

Calls C++ function: [constructor] void QPainter::PixmapFragment::PixmapFragment(const QPainter::PixmapFragment& other).

C++ documentation:

This class is used in conjunction with the QPainter::drawPixmapFragments() function to specify how a pixmap, or sub-rect of a pixmap, is drawn.

The sourceLeft, sourceTop, width and height variables are used as a source rectangle within the pixmap passed into the QPainter::drawPixmapFragments() function. The variables x, y, width and height are used to calculate the target rectangle that is drawn. x and y denotes the center of the target rectangle. The width and height in the target rectangle is scaled by the scaleX and scaleY values. The resulting target rectangle is then rotated rotation degrees around the x, y center point.

source

pub unsafe fn opacity(&self) -> c_double

Returns the value of the opacity field.

source

pub unsafe fn rotation(&self) -> c_double

Returns the value of the rotation field.

source

pub unsafe fn scale_x(&self) -> c_double

Returns the value of the scaleX field.

source

pub unsafe fn scale_y(&self) -> c_double

Returns the value of the scaleY field.

source

pub unsafe fn set_height(&self, value: c_double)

Sets the value of the height field.

source

pub unsafe fn set_opacity(&self, value: c_double)

Sets the value of the opacity field.

source

pub unsafe fn set_rotation(&self, value: c_double)

Sets the value of the rotation field.

source

pub unsafe fn set_scale_x(&self, value: c_double)

Sets the value of the scaleX field.

source

pub unsafe fn set_scale_y(&self, value: c_double)

Sets the value of the scaleY field.

source

pub unsafe fn set_source_left(&self, value: c_double)

Sets the value of the sourceLeft field.

source

pub unsafe fn set_source_top(&self, value: c_double)

Sets the value of the sourceTop field.

source

pub unsafe fn set_width(&self, value: c_double)

Sets the value of the width field.

source

pub unsafe fn set_x(&self, value: c_double)

Sets the value of the x field.

source

pub unsafe fn set_y(&self, value: c_double)

Sets the value of the y field.

source

pub unsafe fn source_left(&self) -> c_double

Returns the value of the sourceLeft field.

source

pub unsafe fn source_top(&self) -> c_double

Returns the value of the sourceTop field.

source

pub unsafe fn width(&self) -> c_double

Returns the value of the width field.

source

pub unsafe fn x(&self) -> c_double

Returns the value of the x field.

source

pub unsafe fn y(&self) -> c_double

Returns the value of the y field.

Trait Implementations§

source§

impl CppDeletable for PixmapFragment

source§

unsafe fn delete(&self)

This class is used in conjunction with the QPainter::drawPixmapFragments() function to specify how a pixmap, or sub-rect of a pixmap, is drawn.

Calls C++ function: [destructor] void QPainter::PixmapFragment::~PixmapFragment().

C++ documentation:

This class is used in conjunction with the QPainter::drawPixmapFragments() function to specify how a pixmap, or sub-rect of a pixmap, is drawn.

The sourceLeft, sourceTop, width and height variables are used as a source rectangle within the pixmap passed into the QPainter::drawPixmapFragments() function. The variables x, y, width and height are used to calculate the target rectangle that is drawn. x and y denotes the center of the target rectangle. The width and height in the target rectangle is scaled by the scaleX and scaleY values. The resulting target rectangle is then rotated rotation degrees around the x, y center point.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.