Struct qt_gui::q_painter::PixmapFragment
source · #[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
.
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
impl PixmapFragment
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<PixmapFragment>>
) -> Ref<PixmapFragment>
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)
.
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.
sourcepub 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>
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 = …)
.
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.
sourcepub 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>
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 = …)
.
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.
sourcepub 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>
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 = …)
.
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.
sourcepub unsafe fn create_3a(
pos: impl CastInto<Ref<QPointF>>,
source_rect: impl CastInto<Ref<QRectF>>,
scale_x: c_double
) -> CppBox<PixmapFragment>
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 = …)
.
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.
sourcepub unsafe fn create_2a(
pos: impl CastInto<Ref<QPointF>>,
source_rect: impl CastInto<Ref<QRectF>>
) -> CppBox<PixmapFragment>
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)
.
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.
sourcepub unsafe fn new() -> CppBox<PixmapFragment>
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()
.
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.
sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<PixmapFragment>>
) -> CppBox<PixmapFragment>
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)
.
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.
sourcepub unsafe fn set_height(&self, value: c_double)
pub unsafe fn set_height(&self, value: c_double)
Sets the value of the height
field.
sourcepub unsafe fn set_opacity(&self, value: c_double)
pub unsafe fn set_opacity(&self, value: c_double)
Sets the value of the opacity
field.
sourcepub unsafe fn set_rotation(&self, value: c_double)
pub unsafe fn set_rotation(&self, value: c_double)
Sets the value of the rotation
field.
sourcepub unsafe fn set_scale_x(&self, value: c_double)
pub unsafe fn set_scale_x(&self, value: c_double)
Sets the value of the scaleX
field.
sourcepub unsafe fn set_scale_y(&self, value: c_double)
pub unsafe fn set_scale_y(&self, value: c_double)
Sets the value of the scaleY
field.
sourcepub unsafe fn set_source_left(&self, value: c_double)
pub unsafe fn set_source_left(&self, value: c_double)
Sets the value of the sourceLeft
field.
sourcepub unsafe fn set_source_top(&self, value: c_double)
pub unsafe fn set_source_top(&self, value: c_double)
Sets the value of the sourceTop
field.
sourcepub unsafe fn source_left(&self) -> c_double
pub unsafe fn source_left(&self) -> c_double
Returns the value of the sourceLeft
field.
sourcepub unsafe fn source_top(&self) -> c_double
pub unsafe fn source_top(&self) -> c_double
Returns the value of the sourceTop
field.
Trait Implementations§
source§impl CppDeletable for PixmapFragment
impl CppDeletable for PixmapFragment
source§unsafe fn delete(&self)
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()
.
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.