Kanzi 3.9.10
kanzi::Node2D::ClippingArea Struct Reference

Clipping information carried from parents. More...

#include <kanzi/core.ui/node/node2d.hpp>

Public Types

typedef RectangleFloat RectangleType
 Type of rectangle used for clipping.
 

Public Member Functions

 ClippingArea ()
 Empty constructor.
 
 ClippingArea (RectangleType rectangle, RectangleType childRectangle, RectangleType previousRectangle, bool clipSelfEnabled, bool clipChildrenEnabled)
 Constructor.
 
 ClippingArea (RectangleType rectangle, RectangleType previousRectangle, bool clipSelfEnabled, bool clipChildrenEnabled)
 Constructor where node and child clipping rectangles are equal.
 
RectangleType getChildClippingRectangle () const
 Gets the clipping rectangle passed down to the children of the node.
 
RectangleType getClippingRectangle () const
 Gets the clipping rectangle for the node content.
 
float getHeight () const
 Gets the height of the node.
 
float getOffsetX () const
 Gets the left edge of the node.
 
float getOffsetY () const
 Gets the top edge of the node.
 
float getWidth () const
 Gets the width of the node.
 
float getX2 () const
 Gets the right edge of the node.
 
float getY2 () const
 Gets the bottom edge of the node.
 
void intersect (RectangleType intersectionArea)
 Intersects area with a rectangle.
 
bool isClipChildrenEnabled () const
 Returns whether the node passes a clipping rectangle down to its children.
 
bool isClippingRectangleChanged () const
 Returns whether the clipping rectangle changed.
 
bool isClipSelfEnabled () const
 Returns whether the node clips itself to the defined clipping area.
 
void setChildClippingRectangle (RectangleType rect)
 Sets the clipping rectangle passed down to the children of the node.
 
void setClipChildrenEnabled (bool enabled)
 Sets the clipping rectangle propagation flag.
 
void setClipSelfEnabled (bool enabled)
 Sets the self-clipping enabled flag.
 
void setHeight (float height)
 Set the height of the node.
 
void setOffsetX (float offset)
 Sets the left edge of the node.
 
void setOffsetY (float offset)
 Sets the top edge of the node.
 
void setWidth (float width)
 Sets the width of the node.
 

Detailed Description

Clipping information carried from parents.

Member Typedef Documentation

◆ RectangleType

Constructor & Destructor Documentation

◆ ClippingArea() [1/3]

kanzi::Node2D::ClippingArea::ClippingArea ( )
inlineexplicit

Empty constructor.

◆ ClippingArea() [2/3]

kanzi::Node2D::ClippingArea::ClippingArea ( RectangleType rectangle,
RectangleType childRectangle,
RectangleType previousRectangle,
bool clipSelfEnabled,
bool clipChildrenEnabled )
inlineexplicit

Constructor.

Parameters
rectangleClipping rectangle.
childRectangleClipping rectangle for children.
previousRectanglePrevious clipping rectangle.
clipSelfEnabledTrue if you want the node to clip itself into the clipping rectangle.
clipChildrenEnabledTrue if you want the children of the node to clip themselves into the child clipping rectangle.

◆ ClippingArea() [3/3]

kanzi::Node2D::ClippingArea::ClippingArea ( RectangleType rectangle,
RectangleType previousRectangle,
bool clipSelfEnabled,
bool clipChildrenEnabled )
inlineexplicit

Constructor where node and child clipping rectangles are equal.

Parameters
rectangleClipping rectangle.
previousRectanglePrevious clipping rectangle.
clipSelfEnabledTrue if you want the node to clip itself into the clipping rectangle.
clipChildrenEnabledTrue if you want the children of the node to clip themselves into the child clipping rectangle.

Member Function Documentation

◆ getClippingRectangle()

RectangleType kanzi::Node2D::ClippingArea::getClippingRectangle ( ) const
inline

Gets the clipping rectangle for the node content.

◆ getChildClippingRectangle()

RectangleType kanzi::Node2D::ClippingArea::getChildClippingRectangle ( ) const
inline

Gets the clipping rectangle passed down to the children of the node.

◆ setChildClippingRectangle()

void kanzi::Node2D::ClippingArea::setChildClippingRectangle ( RectangleType rect)
inline

Sets the clipping rectangle passed down to the children of the node.

◆ getHeight()

float kanzi::Node2D::ClippingArea::getHeight ( ) const
inline

Gets the height of the node.

Returns
Height.

◆ setHeight()

void kanzi::Node2D::ClippingArea::setHeight ( float height)
inline

Set the height of the node.

Parameters
heightNew height.

◆ getOffsetX()

float kanzi::Node2D::ClippingArea::getOffsetX ( ) const
inline

Gets the left edge of the node.

Returns
Left edge.

◆ setOffsetX()

void kanzi::Node2D::ClippingArea::setOffsetX ( float offset)
inline

Sets the left edge of the node.

Parameters
offsetThe offset along the x axis.

◆ getOffsetY()

float kanzi::Node2D::ClippingArea::getOffsetY ( ) const
inline

Gets the top edge of the node.

Returns
Top edge.

◆ setOffsetY()

void kanzi::Node2D::ClippingArea::setOffsetY ( float offset)
inline

Sets the top edge of the node.

Parameters
offsetThe offset along the y axis.

◆ getX2()

float kanzi::Node2D::ClippingArea::getX2 ( ) const
inline

Gets the right edge of the node.

Returns
Right edge.

◆ getY2()

float kanzi::Node2D::ClippingArea::getY2 ( ) const
inline

Gets the bottom edge of the node.

Returns
Bottom edge.

◆ getWidth()

float kanzi::Node2D::ClippingArea::getWidth ( ) const
inline

Gets the width of the node.

Returns
Width.

◆ setWidth()

void kanzi::Node2D::ClippingArea::setWidth ( float width)
inline

Sets the width of the node.

Parameters
widthNew width.

◆ intersect()

void kanzi::Node2D::ClippingArea::intersect ( RectangleType intersectionArea)
inline

Intersects area with a rectangle.

Parameters
intersectionAreaRectangle to intersect with.

◆ isClippingRectangleChanged()

bool kanzi::Node2D::ClippingArea::isClippingRectangleChanged ( ) const
inline

Returns whether the clipping rectangle changed.

Returns
If the clipping rectangle changed, true, otherwise false.

◆ isClipSelfEnabled()

bool kanzi::Node2D::ClippingArea::isClipSelfEnabled ( ) const
inline

Returns whether the node clips itself to the defined clipping area.

Returns
If the node clips itself, true, otherwise false.

◆ setClipSelfEnabled()

void kanzi::Node2D::ClippingArea::setClipSelfEnabled ( bool enabled)
inline

Sets the self-clipping enabled flag.

Parameters
enabledNew enabled flag.

◆ isClipChildrenEnabled()

bool kanzi::Node2D::ClippingArea::isClipChildrenEnabled ( ) const
inline

Returns whether the node passes a clipping rectangle down to its children.

Returns
If the node passes a clipping rectangle to its children, true, otherwise false.

◆ setClipChildrenEnabled()

void kanzi::Node2D::ClippingArea::setClipChildrenEnabled ( bool enabled)
inline

Sets the clipping rectangle propagation flag.

Parameters
enabledNew enabled flag.

The documentation for this struct was generated from the following file: