PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFXClip
Class which represents the clipping region.
#include <SFXClip.h.hpp>
class SFXClip;
SFMTYPEDEFCLASS(SFXClip)

Collaboration diagram

 Collaboration diagram of SFXClipClass

Description

SFXClip is the class that handles the clipping region.

Reference

BREW API AEEClip

Member

Constructor/Destructor
SFXClip( Void )
Constructor of the SFXClip class.
SFXClip( SFXClipConstRef param )
Constructor of the SFXClip class.
SFXClip( SFXRectangleConstRef rectangle )
Constructor of the SFXClip class.
SFXClip( SFXCircleConstRef circle )
Constructor of the SFXClip class.
SFXClip( SFXEllipseConstRef ellipse )
Constructor of the SFXClip class.
SFXClip( SFXPieConstRef pie )
Constructor of the SFXClip class.
SFXClip( SFXTriangleConstRef triangle )
Constructor of the SFXClip class.
SFXClip( SFXPolygonConstRef polygon )
Constructor of the SFXClip class.
Public Functions
static
SFXClipConstRef
EmptyInstance( Void )
Get an empty clipping region.
Bool Equals( SFXClipConstRef param )
Check whether this clipping region equals the specified clipping region or not.
SFXCircleConstRef GetCircle( Void )
Get the circle.
SFXEllipseConstRef GetEllipse( Void )
Get the ellipse.
SFXPieConstRef GetPie( Void )
Get the pie.
SFXPolygonConstRef GetPolygon( Void )
Get the polygon.
SFXRectangleConstRef GetRectangle( Void )
Get the rectangle.
SFXTriangleConstRef GetTriangle( Void )
Get the triangle.
AEEClipShape GetType( Void )
Get the shape of the clipping region.
Bool IsCircle( Void )
Check whether the clipping region is a circle or not.
Bool IsEllipse( Void )
Check whether the clipping region is an ellipse or not.
Bool IsEmpty( Void )
Check whether the clipping region has a valid area or not.
Bool IsNone( Void )
Check whether the shape of the clipping region is undefined or not.
Bool IsPie( Void )
Check whether the clipping region is a pie or not.
Bool IsPolygon( Void )
Check whether the clipping region is a polygon or not.
Bool IsRectangle( Void )
Check whether the clipping region is a rectangle or not.
Bool IsTriangle( Void )
Check whether the clipping region is a triangle or not.
static
SFXClipConstRef
NoneInstance( Void )
Set the shape of clipping region to undefined.
SFXClipRef Normalize( Void )
Normalize the clipping region.
SFXClipRef Offset( SFXGridConstRef param )
Add the specified value to the coordinates of the origin point or the vertices and move this clipping region.
SFXClipRef Offset( SInt16 x , SInt16 y )
Add the specified value to the coordinates of the origin point or the vertices and move this clipping region.
SFXClipRef Set( SFXClipConstRef param )
Set the clipping region.
SFXClipRef Set( SFXRectangleConstRef rectangle )
Set the clipping region.
SFXClipRef Set( SFXCircleConstRef circle )
Set the clipping region.
SFXClipRef Set( SFXEllipseConstRef ellipse )
Set the clipping region.
SFXClipRef Set( SFXPieConstRef pie )
Set the clipping region.
SFXClipRef Set( SFXTriangleConstRef triangle )
Set the clipping region.
SFXClipRef Set( SFXPolygonConstRef polygon )
Set the clipping region.
SFXClipRef SetNone( Void )
Set the shape of clipping region to be undefined.
SFXClipRef Unoffset( SFXGridConstRef param )
Subtract the specified value from the coordinates of the origin point or a vertex and move this clipping region.
SFXClipRef Unoffset( SInt16 x , SInt16 y )
Subtract the specified value from the coordinates of the origin point or a vertex and move this clipping region.
SFXClipRef operator+=( SFXGridConstRef param )
Add the specified value to the coordinates of the origin point or a vertex and move this clipping region.
SFXClipRef operator-=( SFXGridConstRef param )
Subtract the specified value from the coordinates of the origin point or a vertex and move this clipping region.
SFXClipRef operator=( SFXClipConstRef param )
Assign a clipping region.
SFXClip::AtomRec * atomic_cast( SFXClip * param )
Convert SFXClip into SFXClip::AtomRec.
SFXClip::AtomRec const * atomic_cast( SFXClip const * param )
Convert SFXClip into SFXClip::AtomRec.
AEEClip * interface_cast( SFXClip * param )
Convert SFXClip into AEEClip.
AEEClip const * interface_cast( SFXClip const * param )
Convert SFXClip into AEEClip.
Bool operator==( SFXClipConstRef left , SFXClipConstRef right )
Check the "==" relation.
SFXClip operator-( SFXClipConstRef left , SFXGridConstRef right )
Subtract the specified value from the coordinates of the origin point or a vertex and move this clipping region.
Bool operator!=( SFXClipConstRef left , SFXClipConstRef right )
Check the "!=" relation.
SFXClip operator+( SFXClipConstRef left , SFXGridConstRef right )
Add the specified value to the coordinates of the origin point or a vertex and move this clipping region.
Types
AtomRec
Structure that represents a clipping region.
Global Functions
SFXClip::AtomRec * atomic_cast( SFXClip * param )
Convert SFXClip into SFXClip::AtomRec.
SFXClip::AtomRec const * atomic_cast( SFXClip const * param )
Convert SFXClip into SFXClip::AtomRec.
AEEClip * interface_cast( SFXClip * param )
Convert SFXClip into AEEClip.
AEEClip const * interface_cast( SFXClip const * param )
Convert SFXClip into AEEClip.
Bool operator==( SFXClipConstRef left , SFXClipConstRef right )
Check the "==" relation.
SFXClip operator-( SFXClipConstRef left , SFXGridConstRef right )
Subtract the specified value from the coordinates of the origin point or a vertex and move this clipping region.
Bool operator!=( SFXClipConstRef left , SFXClipConstRef right )
Check the "!=" relation.
SFXClip operator+( SFXClipConstRef left , SFXGridConstRef right )
Add the specified value to the coordinates of the origin point or a vertex and move this clipping region.

SFXClip::SFXClip
Constructor of the SFXClip class.
[ public, explicit ]
SFXClip(Void);
[ public ]
SFXClip(
    SFXClipConstRef param   // source clipping region
);
[ public, explicit ]
SFXClip(
    SFXRectangleConstRef rectangle   // source rectangle
);
[ public, explicit ]
SFXClip(
    SFXCircleConstRef circle   // source circle
);
[ public, explicit ]
SFXClip(
    SFXEllipseConstRef ellipse   // source ellipse
);
[ public, explicit ]
SFXClip(
    SFXPieConstRef pie   // source pie
);
[ public, explicit ]
SFXClip(
    SFXTriangleConstRef triangle   // source triangle
);
[ public, explicit ]
SFXClip(
    SFXPolygonConstRef polygon   // source polygon
);

Reference

SFXRectangle | SFXCircle | SFXEllipse | SFXPie | SFXTriangle | SFXPolygon | SFXClip::operator=


SFXClip::EmptyInstance
Get an empty clipping region.
[ public, static ]
SFXClipConstRef EmptyInstance(Void);

Return value

Return an empty SFXClip instance, which means this shape has no area.

Description

A shape has no area if the value of a length-related variable is less than or equals 0. This instance is used mainly as initial value of the assignment statement or return value of the shape-related function.

Reference

SFXClip::NoneInstance


SFXClip::Equals
Check whether this clipping region equals the specified clipping region or not.
[ public, const ]
Bool Equals(
    SFXClipConstRef param   // clipping region to compare
);

Return value

  • If yes: true
  • Otherwise: false

Reference

operator== | operator!=


SFXClip::GetCircle
Get the circle.
[ public, const ]
SFXCircleConstRef GetCircle(Void);

Description

The operation when the clipping region is not circle has not been defined yet.

Reference

SFXCircle | SFXClip::Set | SFXClip::GetEllipse | SFXClip::GetPie | SFXClip::GetPolygon | SFXClip::GetRectangle | SFXClip::GetTriangle | SFXClip::GetType


SFXClip::GetEllipse
Get the ellipse.
[ public, const ]
SFXEllipseConstRef GetEllipse(Void);

Description

The operation when the clipping region is not ellipse has not been defined yet.

Reference

SFXEllipse | SFXClip::Set | SFXClip::GetCircle | SFXClip::GetPie | SFXClip::GetPolygon | SFXClip::GetRectangle | SFXClip::GetTriangle | SFXClip::GetType


SFXClip::GetPie
Get the pie.
[ public, const ]
SFXPieConstRef GetPie(Void);

Description

The operation when the clipping region is not pie has not been defined yet.

Reference

SFXPie | SFXClip::Set | SFXClip::GetCircle | SFXClip::GetEllipse | SFXClip::GetPolygon | SFXClip::GetRectangle | SFXClip::GetTriangle | SFXClip::GetType


SFXClip::GetPolygon
Get the polygon.
[ public, const ]
SFXPolygonConstRef GetPolygon(Void);

Description

The operation when the clipping region is not polygon has not been defined yet.

Reference

SFXPolygon | SFXClip::Set | SFXClip::GetCircle | SFXClip::GetEllipse | SFXClip::GetPie | SFXClip::GetRectangle | SFXClip::GetTriangle | SFXClip::GetType


SFXClip::GetRectangle
Get the rectangle.
[ public, const ]
SFXRectangleConstRef GetRectangle(Void);

Description

The operation when the clipping region is not rectangle has not been defined yet.

Reference

SFXRectangle | SFXClip::Set | SFXClip::GetCircle | SFXClip::GetEllipse | SFXClip::GetPie | SFXClip::GetPolygon | SFXClip::GetTriangle | SFXClip::GetType


SFXClip::GetTriangle
Get the triangle.
[ public, const ]
SFXTriangleConstRef GetTriangle(Void);

Description

The operation when the clipping region is not triangle has not been defined yet.

Reference

SFXTriangle | SFXClip::Set | SFXClip::GetCircle | SFXClip::GetEllipse | SFXClip::GetPie | SFXClip::GetPolygon | SFXClip::GetRectangle | SFXClip::GetType


SFXClip::GetType
Get the shape of the clipping region.
[ public, const ]
AEEClipShape GetType(Void);

Return value

Return the next value.

Value Meaning
CLIPPING_NONE shape has not been defined
CLIPPING_CIRCLE circle
CLIPPING_ELLIPSE ellipse
CLIPPING_PIE pie
CLIPPING_POLYGON polygon
CLIPPING_TRIANGLE triangle
CLIPPING_RECT rectangle

Reference

SFXClip::Set | SFXClip::GetCircle | SFXClip::GetEllipse | SFXClip::GetPie | SFXClip::GetPolygon | SFXClip::GetRectangle | SFXClip::GetTriangle


SFXClip::IsCircle
Check whether the clipping region is a circle or not.
[ public, const ]
Bool IsCircle(Void);

Return value

  • If yes: true
  • Otherwise: false

Reference

SFXClip::IsEllipse | SFXClip::IsNone | SFXClip::IsPie | SFXClip::IsPolygon | SFXClip::IsRectangle | SFXClip::IsTriangle


SFXClip::IsEllipse
Check whether the clipping region is an ellipse or not.
[ public, const ]
Bool IsEllipse(Void);

Return value

  • If yes: true
  • Otherwise: false

Reference

SFXClip::IsCircle | SFXClip::IsNone | SFXClip::IsPie | SFXClip::IsPolygon | SFXClip::IsRectangle | SFXClip::IsTriangle


SFXClip::IsEmpty
Check whether the clipping region has a valid area or not.
[ public, const ]
Bool IsEmpty(Void);

Return value

  • If yes: true
  • Otherwise: false

Description

For the clipping region that is circle, ellipse, pie, polygon, triangle, or rectangle, if it has a valid area, the function returns true.

Reference

SFXRectangle::IsEmpty | SFXCircle::IsEmpty | SFXEllipse::IsEmpty | SFXPie::IsEmpty | SFXTriangle::IsEmpty | SFXPolygon::IsEmpty


SFXClip::IsNone
Check whether the shape of the clipping region is undefined or not.
[ public, const ]
Bool IsNone(Void);

Return value

  • If yes: true
  • Otherwise: false

Description

This function returns true only if the type is CLIPPING_NONE.

Reference

SFXClip::GetType


SFXClip::IsPie
Check whether the clipping region is a pie or not.
[ public, const ]
Bool IsPie(Void);

Return value

  • If yes: true
  • Otherwise: false

Reference

SFXPie | SFXClip::IsCircle | SFXClip::IsEllipse | SFXClip::IsNone | SFXClip::IsPolygon | SFXClip::IsRectangle | SFXClip::IsTriangle


SFXClip::IsPolygon
Check whether the clipping region is a polygon or not.
[ public, const ]
Bool IsPolygon(Void);

Return value

  • If yes: true
  • Otherwise: false

Reference

SFXPolygon | SFXClip::IsCircle | SFXClip::IsEllipse | SFXClip::IsNone | SFXClip::IsPie | SFXClip::IsRectangle | SFXClip::IsTriangle


SFXClip::IsRectangle
Check whether the clipping region is a rectangle or not.
[ public, const ]
Bool IsRectangle(Void);

Return value

  • If yes: true
  • Otherwise: false

Reference

SFXRectangle | SFXClip::IsCircle | SFXClip::IsEllipse | SFXClip::IsNone | SFXClip::IsPie | SFXClip::IsPolygon | SFXClip::IsTriangle


SFXClip::IsTriangle
Check whether the clipping region is a triangle or not.
[ public, const ]
Bool IsTriangle(Void);

Return value

  • If yes: true
  • Otherwise: false

Reference

SFXTriangle | SFXClip::IsCircle | SFXClip::IsEllipse | SFXClip::IsNone | SFXClip::IsPie | SFXClip::IsPolygon | SFXClip::IsRectangle


SFXClip::NoneInstance
Set the shape of clipping region to undefined.
[ public, static ]
SFXClipConstRef NoneInstance(Void);

Description

For an area that the shape is undefined, get the instance that represents 0.

Reference

SFXClip::EmptyInstance


SFXClip::Normalize
Normalize the clipping region.
[ public ]
SFXClipRef Normalize(Void);

Description

To make the clipping region to be valid, reverse the sign of the negative values.

Example

SFXClip clip;
SFXRectangle rect(10, 10, -50, 50);  

clip.Set(rect);       // set the clipping region to a rectangle
  
if(clip.IsEmpty()){   // check whether the clip is empty
                      // this function returns true since the width is less tan 0

    clip.Normalize(); // normalize the clip 

}

Reference

SFXRectangle::Normalize | SFXCircle::Normalize | SFXEllipse::Normalize | SFXPie::Normalize | SFXTriangle::Normalize | SFXPolygon::Normalize


SFXClip::Offset
Add the specified value to the coordinates of the origin point or the vertices and move this clipping region.
[ public ]
SFXClipRef Offset(
    SFXGridConstRef param   // value to add to the coordinates
);
[ public ]
SFXClipRef Offset(
    SInt16 x   // value to add to the X coordinate
    SInt16 y   // value to add to the Y coordinate
);

Reference

SFXClip::Unoffset | operator- | operator+


SFXClip::Set
Set the clipping region.
[ public ]
SFXClipRef Set(
    SFXClipConstRef param   // clipping region to set
);
[ public ]
SFXClipRef Set(
    SFXRectangleConstRef rectangle   // rectangle to set
);
[ public ]
SFXClipRef Set(
    SFXCircleConstRef circle   // circle to set
);
[ public ]
SFXClipRef Set(
    SFXEllipseConstRef ellipse   // ellipse to set
);
[ public ]
SFXClipRef Set(
    SFXPieConstRef pie   // pie to set
);
[ public ]
SFXClipRef Set(
    SFXTriangleConstRef triangle   // triangle to set
);
[ public ]
SFXClipRef Set(
    SFXPolygonConstRef polygon   // polygon to set
);

Reference

SFXRectangle | SFXCircle | SFXEllipse | SFXPie | SFXTriangle | SFXPolygon | SFXClip::operator=


SFXClip::SetNone
Set the shape of clipping region to be undefined.
[ public ]
SFXClipRef SetNone(Void);

Reference

SFXClip::Set


SFXClip::Unoffset
Subtract the specified value from the coordinates of the origin point or a vertex and move this clipping region.
[ public ]
SFXClipRef Unoffset(
    SFXGridConstRef param   // value to subtract from the coordinates
);
[ public ]
SFXClipRef Unoffset(
    SInt16 x   // value to subtract from the X coordinate
    SInt16 y   // value to subtract from the Y coordinate
);

Reference

SFXClip::Offset | operator- | operator+


atomic_cast
Convert SFXClip into SFXClip::AtomRec.
[ public, friend ]
SFXClip::AtomRec * atomic_cast(
    SFXClip * param   // clipping area to cast
);
[ public, friend ]
SFXClip::AtomRec const * atomic_cast(
    SFXClip const * param   // clipping area to cast
);

Reference

SFXClip::AtomRec


interface_cast
Convert SFXClip into AEEClip.
[ public, friend ]
AEEClip * interface_cast(
    SFXClip * param   // clipping region to cast
);
[ public, friend ]
AEEClip const * interface_cast(
    SFXClip const * param   // clipping region to cast
);

SFXClip::operator=
Assign a clipping region.
[ public ]
SFXClipRef operator=(
    SFXClipConstRef param   // source clipping region
);

Reference

SFXClip::Set


operator==
Check the "==" relation.
[ public, friend ]
Bool operator==(
    SFXClipConstRef left    // clipping region to compare
    SFXClipConstRef right   // clipping region to compare
);

Return value

  • If yes: true
  • Otherwise: false

Reference

SFXClip::Equals | operator!=


SFXClip::operator-=
Subtract the specified value from the coordinates of the origin point or a vertex and move this clipping region.
[ public ]
SFXClipRef operator-=(
    SFXGridConstRef param   // value to subtract from the coordinates
);

Reference

SFXClip::Unoffset | operator- | SFXClip::operator+=


operator-
Subtract the specified value from the coordinates of the origin point or a vertex and move this clipping region.
[ public, friend ]
SFXClip operator-(
    SFXClipConstRef left    // clipping region to move
    SFXGridConstRef right   // value to subtract from the coordinates
);

Reference

SFXClip::Unoffset | SFXClip::operator-= | operator+


operator!=
Check the "!=" relation.
[ public, friend ]
Bool operator!=(
    SFXClipConstRef left    // clipping region to compare
    SFXClipConstRef right   // clipping region to compare
);

Return value

  • If yes: true
  • Otherwise: false

Reference

SFXClip::Equals | operator==


SFXClip::operator+=
Add the specified value to the coordinates of the origin point or a vertex and move this clipping region.
[ public ]
SFXClipRef operator+=(
    SFXGridConstRef param   // value to add to the coordinates
);

Reference

SFXClip::Offset | SFXClip::operator-= | operator+


operator+
Add the specified value to the coordinates of the origin point or a vertex and move this clipping region.
[ public, friend ]
SFXClip operator+(
    SFXClipConstRef left    // clipping region to move
    SFXGridConstRef right   // value to add to the coordinates
);

Reference

SFXClip::Offset | operator- | SFXClip::operator+=


SFXClip::AtomRec
Structure that represents a clipping region.
struct AtomRec {
  AEEClipShape type;
  union {
    SFXRectangle::AtomRec  rectangle;
    SFXCircle::AtomRec     circle;
    SFXEllipse::AtomRec    ellipse;
    SFXPie::AtomRec        pie;
    SFXTriangle::AtomRec   triangle;
    SFXPolygon::AtomRec    polygon;
  };
};