Kanzi Framework  3.9.0
Kanzi Engine API
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. More...
 

Public Member Functions

 ClippingArea ()
 Empty constructor. More...
 
 ClippingArea (RectangleType rectangle, RectangleType childRectangle, RectangleType previousRectangle, bool clipSelfEnabled, bool clipChildrenEnabled)
 Constructor. More...
 
 ClippingArea (RectangleType rectangle, RectangleType previousRectangle, bool clipSelfEnabled, bool clipChildrenEnabled)
 Constructor where node and child clipping rectangles are equal. More...
 
RectangleType getChildClippingRectangle () const
 Gets the clipping rectangle passed down to the children of the node. More...
 
RectangleType getClippingRectangle () const
 Gets the clipping rectangle for the node content. More...
 
float getHeight () const
 Get height. More...
 
float getOffsetX () const
 Get left edge. More...
 
float getOffsetY () const
 Get top edge. More...
 
float getWidth () const
 Get width. More...
 
float getX2 () const
 Get right edge. More...
 
float getY2 () const
 Get bottom edge. More...
 
void intersect (RectangleType intersectionArea)
 Intersect area with a rectangle. More...
 
bool isClipChildrenEnabled () const
 Tell if the node is passing a clipping rectangle down to its children. More...
 
bool isClippingRectangleChanged () const
 Tell if clipping rectangle is changed. More...
 
bool isClipSelfEnabled () const
 Tells if node should clip itself to the clipping area defined. More...
 
void setChildClippingRectangle (RectangleType rect)
 Sets the clipping rectangle passed down to the children of the node. More...
 
void setClipChildrenEnabled (bool enabled)
 Set propagate flag. More...
 
void setClipSelfEnabled (bool enabled)
 Set enabled flag. More...
 
void setHeight (float height)
 Set height. More...
 
void setOffsetX (float offset)
 Set left edge. More...
 
void setOffsetY (float offset)
 Set top edge. More...
 
void setWidth (float width)
 Set width edge. More...
 

Detailed Description

Clipping information carried from parents.

Member Typedef Documentation

◆ RectangleType

Type of rectangle used for clipping.

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 the node should clip self into the clipping rectangle.
clipChildrenEnabledTrue if the children of the node should 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 the node should clip self into the clipping rectangle.
clipChildrenEnabledTrue if the children of the node should 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

Get height.

Returns
Height.

◆ setHeight()

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

Set height.

Parameters
heightNew height.

◆ getOffsetX()

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

Get left edge.

Returns
Left edge.

◆ setOffsetX()

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

Set left edge.

Parameters
offsetNew X offset.

◆ getOffsetY()

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

Get top edge.

Returns
Top edge.

◆ setOffsetY()

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

Set top edge.

Parameters
offsetNew Y offset.

◆ getX2()

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

Get right edge.

Returns
Right edge.

◆ getY2()

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

Get bottom edge.

Returns
Bottom edge.

◆ getWidth()

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

Get width.

Returns
Width.

◆ setWidth()

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

Set width edge.

Parameters
widthNew width.

◆ intersect()

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

Intersect area with a rectangle.

Parameters
intersectionAreaRectangle to intersect with.

◆ isClippingRectangleChanged()

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

Tell if clipping rectangle is changed.

Returns
True if yes, false if no.

◆ isClipSelfEnabled()

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

Tells if node should clip itself to the clipping area defined.

Returns
True if yes, false if no.

◆ setClipSelfEnabled()

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

Set enabled flag.

Parameters
enabledNew enabled flag.

◆ isClipChildrenEnabled()

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

Tell if the node is passing a clipping rectangle down to its children.

Returns
True if yes, false if no.

◆ setClipChildrenEnabled()

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

Set propagate flag.

Parameters
enabledNew enabled flag.

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