PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFXPolygon
Class which represents a polygon.
#include <SFXPolygon.h.hpp>
class SFXPolygon;
SFMTYPEDEFCLASS(SFXPolygon)

Description

SFXPolygon class processes the vertices' coordinates as an array.

SFXPolygon does not allocate the internal heap. It is necessary to create an array that keeps the coordinates of the vertices.

The created array should not be deleted when it is in the scope of SFXPolygon class.

Member

Constructor/Destructor
SFXPolygon( Void )
Constructor of the SFXPolygon class.
SFXPolygon( SFXPolygonConstRef param )
Constructor of the SFXPolygon class.
SFXPolygon( SFXPixelPtr vertex , SInt16 length )
Constructor of the SFXPolygon class.
SFXPolygon( SFXPolylineConstRef polyline )
Constructor of the SFXPolygon class.
Public Functions
SFXPolygonRef AddVertex( SInt16 index , SFXPixelConstRef value )
Add the specified value to the coordinates of a vertex.
SFXPolygonRef AddVertex( SInt16 index , SInt16 x , SInt16 y )
Add the specified value to the coordinates of a vertex.
SFXPolygonRef AddVertexX( SInt16 index , SInt16 value )
Add the specified value to the X coordinate of a vertex.
SFXPolygonRef AddVertexY( SInt16 index , SInt16 value )
Add the specified value to the Y coordinate of a vertex.
SFXPolygonRef DivVertex( SInt16 index , SInt16 x , SInt16 y )
Divide the coordinates of a vertex by a specifed value.
SFXPolygonRef DivVertex( SInt16 index , SInt16 value )
Divide the coordinates of a vertex by a specifed value.
SFXPolygonRef DivVertexX( SInt16 index , SInt16 value )
Divide the X coordinate of a vertex by a specifed value.
SFXPolygonRef DivVertexY( SInt16 index , SInt16 value )
Divide the Y coordinate of a vertex by a specifed value.
static
SFXPolygonConstRef
EmptyInstance( Void )
Get an empty polygon.
Bool Equals( SFXPolygonConstRef param )
Check whether this polygon equals the specified polygon or not.
Bool Equals( SFXPixelConstPtr vertex , SInt16 length )
Check whether this polygon equals the specified polygon or not.
SInt16 GetLength( Void )
Get the number of vertices.
SFXPixelPtr GetVertex( Void )
Get the coordinates of a vertex (vertices).
SFXPixelConstRef GetVertex( SInt16 index )
Get the coordinates of a vertex (vertices).
SInt16 GetVertexX( SInt16 index )
Get the X coordinate of a vertex.
SInt16 GetVertexY( SInt16 index )
Get the Y coordinate of a vertex.
Bool IsEmpty( Void )
Check whether this polygon is empty or not.
SFXPolygonRef ModVertex( SInt16 index , SInt16 x , SInt16 y )
Set the coordinates of a vertex to the remainder of the division of this coordinates by the specified value.
SFXPolygonRef ModVertex( SInt16 index , SInt16 value )
Set the coordinates of a vertex to the remainder of the division of this coordinates by the specified value.
SFXPolygonRef ModVertexX( SInt16 index , SInt16 value )
Set the X coordinate of a vertex to the remainder of the division of X coordinate by the specified value.
SFXPolygonRef ModVertexY( SInt16 index , SInt16 value )
Set the Y coordinate of a vertex to the remainder of the division of Y coordinate by the specified value.
SFXPolygonRef MulVertex( SInt16 index , SInt16 x , SInt16 y )
Multiply the coordinates of a vertex by the specified value.
SFXPolygonRef MulVertex( SInt16 index , SInt16 value )
Multiply the coordinates of a vertex by the specified value.
SFXPolygonRef MulVertexX( SInt16 index , SInt16 value )
Multiply the X coordinate of the vertex by the specified value.
SFXPolygonRef MulVertexY( SInt16 index , SInt16 value )
Multiply the Y coordinate of a vertex by the specified value.
SFXPolygonRef NegVertex( SInt16 index )
Negate the sign of the coordinates of a vertex.
SFXPolygonRef NegVertexX( SInt16 index )
Negate the sign of the X coordinate of a vertex.
SFXPolygonRef NegVertexY( SInt16 index )
Negate the sign of the Y coordinate of a vertex.
SFXPolygonRef Normalize( Void )
Nprmalize the polygon.
SFXPolygonRef Offset( SFXGridConstRef param )
Add the specified value to the coordinates of all the vertices and move this polygon.
SFXPolygonRef Offset( SInt16 x , SInt16 y )
Add the specified value to the coordinates of all the vertices and move this polygon.
SFXPolygonRef Set( SFXPolygonConstRef param )
Set the polygon.
SFXPolygonRef Set( SFXPixelPtr vertex , SInt16 length )
Set the polygon.
SFXPolygonRef Set( SFXPolylineConstRef polyline )
Set the polygon.
SFXPolygonRef SetLength( SInt16 param )
Set the number of vertices.
SFXPolygonRef SetVertex( SFXPixelPtr param )
Set the coordinates of a vertex (vertices).
SFXPolygonRef SetVertex( SInt16 index , SFXPixelConstRef value )
Set the coordinates of a vertex (vertices).
SFXPolygonRef SetVertex( SInt16 index , SInt16 x , SInt16 y )
Set the coordinates of a vertex (vertices).
SFXPolygonRef SetVertexX( SInt16 index , SInt16 value )
Set the X coordinate of the specified vertex.
SFXPolygonRef SetVertexY( SInt16 index , SInt16 value )
Set the Y coordinate of the specified vertex.
SFXPolygonRef SubVertex( SInt16 index , SFXPixelConstRef value )
Subtract the specified value from the coordinates of a vertex.
SFXPolygonRef SubVertex( SInt16 index , SInt16 x , SInt16 y )
Subtract the specified value from the coordinates of a vertex.
SFXPolygonRef SubVertexX( SInt16 index , SInt16 value )
Subtract the specified value from the X coordinate of a vertex.
SFXPolygonRef SubVertexY( SInt16 index , SInt16 value )
Subtract the specified value from the Y coordinate of a vertex.
SFXPolygonRef Unoffset( SFXGridConstRef param )
Subtract the specified value from the coordinates of all the vertices and move this polygon.
SFXPolygonRef Unoffset( SInt16 x , SInt16 y )
Subtract the specified value from the coordinates of all the vertices and move this polygon.
static
SFXPolygonConstRef
ZeroInstance( Void )
Get the instance that represents 0.
SFXPolygonRef operator+=( SFXGridConstRef param )
Add the specified value to the coordinates of all the vertices and move this polygon.
SFXPolygonRef operator-=( SFXGridConstRef param )
Subtract the specified value from the coordinates of all the vertices and move this polygon.
SFXPolygonRef operator=( SFXPolygonConstRef param )
Assign the polygon.
SFXPixelRef operator[]( SInt16 index )
Get the coordinates of the specified vertex.
SFXPolygon::AtomRec * atomic_cast( SFXPolygon * param )
Convert SFXPolygon into SFXPolygon::AtomRec.
SFXPolygon::AtomRec const * atomic_cast( SFXPolygon const * param )
Convert SFXPolygon into SFXPolygon::AtomRec.
AEEPolygon * interface_cast( SFXPolygon * param )
Convert the SFXPolygon into AEEPolygon.
AEEPolygon const * interface_cast( SFXPolygon const * param )
Convert the SFXPolygon into AEEPolygon.
Bool operator==( SFXPolygonConstRef left , SFXPolygonConstRef right )
Check the "==" relation.
SFXPolygon operator-( SFXPolygonConstRef left , SFXGridConstRef right )
Subtract the specified value from the coordinates of all the vertices of a polygon and move this polygon.
Bool operator!=( SFXPolygonConstRef left , SFXPolygonConstRef right )
Check the "!=" relation.
SFXPolygon operator+( SFXPolygonConstRef left , SFXGridConstRef right )
Add the specified value to the coordinates of all the vertices of a polygon and move this polygon.
Types
AtomRec
Structure that represents a polygon.
Global Functions
SFXPolygon::AtomRec * atomic_cast( SFXPolygon * param )
Convert SFXPolygon into SFXPolygon::AtomRec.
SFXPolygon::AtomRec const * atomic_cast( SFXPolygon const * param )
Convert SFXPolygon into SFXPolygon::AtomRec.
AEEPolygon * interface_cast( SFXPolygon * param )
Convert the SFXPolygon into AEEPolygon.
AEEPolygon const * interface_cast( SFXPolygon const * param )
Convert the SFXPolygon into AEEPolygon.
Bool operator==( SFXPolygonConstRef left , SFXPolygonConstRef right )
Check the "==" relation.
SFXPolygon operator-( SFXPolygonConstRef left , SFXGridConstRef right )
Subtract the specified value from the coordinates of all the vertices of a polygon and move this polygon.
Bool operator!=( SFXPolygonConstRef left , SFXPolygonConstRef right )
Check the "!=" relation.
SFXPolygon operator+( SFXPolygonConstRef left , SFXGridConstRef right )
Add the specified value to the coordinates of all the vertices of a polygon and move this polygon.

SFXPolygon::SFXPolygon
Constructor of the SFXPolygon class.
[ public, explicit ]
SFXPolygon(Void);
[ public ]
SFXPolygon(
    SFXPolygonConstRef param   // source polygon
);
[ public, explicit ]
SFXPolygon(
    SFXPixelPtr vertex   // array of vertices
    SInt16 length        // number of vertices
);
[ public, explicit ]
SFXPolygon(
    SFXPolylineConstRef polyline   // source polyline
);

SFXPolygon::AddVertex
Add the specified value to the coordinates of a vertex.
[ public ]
SFXPolygonRef AddVertex(
    SInt16 index             // index of the vertex
    SFXPixelConstRef value   // value to add to the coordinates of the vertex
);
[ public ]
SFXPolygonRef AddVertex(
    SInt16 index   // index of the vertex
    SInt16 x       // value to add to the X coordinate of the vertex
    SInt16 y       // value to add to the Y coordinate of the vertex
);

Reference

SFXPolygon::AddVertexX | SFXPolygon::AddVertexY | SFXPolygon::SubVertex | SFXPolygon::MulVertex | SFXPolygon::DivVertex | SFXPolygon::ModVertex | SFXPolygon::NegVertex


SFXPolygon::AddVertexX
Add the specified value to the X coordinate of a vertex.
[ public ]
SFXPolygonRef AddVertexX(
    SInt16 index   // index of the vertex
    SInt16 value   // value to add to the coordinates of the vertex
);

Reference

SFXPolygon::AddVertex | SFXPolygon::AddVertexY | SFXPolygon::SubVertexX | SFXPolygon::MulVertexX | SFXPolygon::DivVertexX | SFXPolygon::ModVertexX | SFXPolygon::NegVertexX


SFXPolygon::AddVertexY
Add the specified value to the Y coordinate of a vertex.
[ public ]
SFXPolygonRef AddVertexY(
    SInt16 index   // index of the vertex
    SInt16 value   // value to add to the coordinates of the vertex
);

Reference

SFXPolygon::AddVertex | SFXPolygon::AddVertexX | SFXPolygon::SubVertexY | SFXPolygon::MulVertexY | SFXPolygon::DivVertexY | SFXPolygon::ModVertexY | SFXPolygon::NegVertexY


SFXPolygon::DivVertex
Divide the coordinates of a vertex by a specifed value.
[ public ]
SFXPolygonRef DivVertex(
    SInt16 index   // index of the vertex
    SInt16 x       // divide the X coordinate by this value
    SInt16 y       // divide the Y coordinate by this value
);
[ public ]
SFXPolygonRef DivVertex(
    SInt16 index   // index of the vertex
    SInt16 value   // divide the coordinates by this value
);

Description

The behaviour is not defined when the value of x, y, or value argument is 0.

Reference

SFXPolygon::AddVertex | SFXPolygon::SubVertex | SFXPolygon::MulVertex | SFXPolygon::DivVertexX | SFXPolygon::DivVertexY | SFXPolygon::ModVertex | SFXPolygon::NegVertex


SFXPolygon::DivVertexX
Divide the X coordinate of a vertex by a specifed value.
[ public ]
SFXPolygonRef DivVertexX(
    SInt16 index   // index of the vertex
    SInt16 value   // divide the X coordinate by this value
);

Description

The behaviour is not defined when the value of value argument is 0.

Reference

SFXPolygon::AddVertexX | SFXPolygon::SubVertexX | SFXPolygon::MulVertexX | SFXPolygon::DivVertex | SFXPolygon::DivVertexY | SFXPolygon::ModVertexX | SFXPolygon::NegVertexX


SFXPolygon::DivVertexY
Divide the Y coordinate of a vertex by a specifed value.
[ public ]
SFXPolygonRef DivVertexY(
    SInt16 index   // index of the vertex
    SInt16 value   // divide the Y coordinate by this value
);

Description

The behaviour is not defined when the value of value argument is 0.

Reference

SFXPolygon::AddVertexY | SFXPolygon::SubVertexY | SFXPolygon::MulVertexY | SFXPolygon::DivVertex | SFXPolygon::DivVertexX | SFXPolygon::ModVertexY | SFXPolygon::NegVertexY


SFXPolygon::EmptyInstance
Get an empty polygon.
[ public, static ]
SFXPolygonConstRef EmptyInstance(Void);

Return value

Return an empty SFXPolygon 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.


SFXPolygon::Equals
Check whether this polygon equals the specified polygon or not.
[ public, const ]
Bool Equals(
    SFXPolygonConstRef param   // polygon to compare
);
[ public, const ]
Bool Equals(
    SFXPixelConstPtr vertex   // vertices array of the polygon to compare
    SInt16 length             // number of vertices of the polygon to compare
);

Return value

  • If yes: true
  • Otherwise: false

Reference

operator== | operator!=


SFXPolygon::GetLength
Get the number of vertices.
[ public, const ]
SInt16 GetLength(Void);

Reference

SFXPolygon::SetLength


SFXPolygon::GetVertex
Get the coordinates of a vertex (vertices).
[ public, const ]
SFXPixelPtr GetVertex(Void);
[ public, const ]
SFXPixelConstRef GetVertex(
    SInt16 index   // index of the vertex
);

Reference

SFXPolygon::GetVertexX | SFXPolygon::GetVertexY | SFXPolygon::SetVertex


SFXPolygon::GetVertexX
Get the X coordinate of a vertex.
[ public, const ]
SInt16 GetVertexX(
    SInt16 index   // index of the vertex
);

Reference

SFXPolygon::GetVertex | SFXPolygon::GetVertexY | SFXPolygon::SetVertexX


SFXPolygon::GetVertexY
Get the Y coordinate of a vertex.
[ public, const ]
SInt16 GetVertexY(
    SInt16 index   // index of the vertex
);

Reference

SFXPolygon::GetVertex | SFXPolygon::GetVertexX | SFXPolygon::SetVertexY


SFXPolygon::IsEmpty
Check whether this polygon is empty or not.
[ public, const ]
Bool IsEmpty(Void);

Return value

  • If yes: true
  • Otherwise: false

SFXPolygon::ModVertex
Set the coordinates of a vertex to the remainder of the division of this coordinates by the specified value.
[ public ]
SFXPolygonRef ModVertex(
    SInt16 index   // index of the vertex
    SInt16 x       // divide X coordinate by this value
    SInt16 y       // divide Y coordinate by this value
);
[ public ]
SFXPolygonRef ModVertex(
    SInt16 index   // index of the vertex
    SInt16 value   // divide the coordinates by this value
);

Description

The behaviour is not defined when the value of x, y, or value argument is 0.

Reference

SFXPolygon::AddVertex | SFXPolygon::SubVertex | SFXPolygon::MulVertex | SFXPolygon::DivVertex | SFXPolygon::ModVertexX | SFXPolygon::ModVertexY | SFXPolygon::NegVertex


SFXPolygon::ModVertexX
Set the X coordinate of a vertex to the remainder of the division of X coordinate by the specified value.
[ public ]
SFXPolygonRef ModVertexX(
    SInt16 index   // index of the vertex
    SInt16 value   // divide X coordinate by this value
);

Description

The behaviour is not defined when the value of value argument is 0.

Reference

SFXPolygon::AddVertexX | SFXPolygon::SubVertexX | SFXPolygon::MulVertexX | SFXPolygon::DivVertexX | SFXPolygon::ModVertex | SFXPolygon::ModVertexY | SFXPolygon::NegVertexX


SFXPolygon::ModVertexY
Set the Y coordinate of a vertex to the remainder of the division of Y coordinate by the specified value.
[ public ]
SFXPolygonRef ModVertexY(
    SInt16 index   // index of the vertex
    SInt16 value   // divide Y coordinate by this value
);

Description

The behaviour is not defined when the value of value argument is 0.

Reference

SFXPolygon::AddVertexY | SFXPolygon::SubVertexY | SFXPolygon::MulVertexY | SFXPolygon::DivVertexY | SFXPolygon::ModVertex | SFXPolygon::ModVertexX | SFXPolygon::NegVertexY


SFXPolygon::MulVertex
Multiply the coordinates of a vertex by the specified value.
[ public ]
SFXPolygonRef MulVertex(
    SInt16 index   // index of the vertex
    SInt16 x       // value to multiply with the X coordinate of the vertex
    SInt16 y       // value to multiply with the Y coordinate of the vertex
);
[ public ]
SFXPolygonRef MulVertex(
    SInt16 index   // index of the vertex
    SInt16 value   // value to multiply with the coordinates of the vertex
);

Reference

SFXPolygon::AddVertex | SFXPolygon::SubVertex | SFXPolygon::MulVertexX | SFXPolygon::MulVertexY | SFXPolygon::DivVertex | SFXPolygon::ModVertex | SFXPolygon::NegVertex


SFXPolygon::MulVertexX
Multiply the X coordinate of the vertex by the specified value.
[ public ]
SFXPolygonRef MulVertexX(
    SInt16 index   // index of the vertex
    SInt16 value   // value to multiply with the X coordinate of the vertex
);

Reference

SFXPolygon::AddVertexX | SFXPolygon::SubVertexX | SFXPolygon::MulVertex | SFXPolygon::MulVertexY | SFXPolygon::DivVertexX | SFXPolygon::ModVertexX | SFXPolygon::NegVertexX


SFXPolygon::MulVertexY
Multiply the Y coordinate of a vertex by the specified value.
[ public ]
SFXPolygonRef MulVertexY(
    SInt16 index   // index of the vertex
    SInt16 value   // value to multiply with the Y coordinate of the vertex
);

Reference

SFXPolygon::AddVertexY | SFXPolygon::SubVertexY | SFXPolygon::MulVertex | SFXPolygon::MulVertexX | SFXPolygon::DivVertexY | SFXPolygon::ModVertexY | SFXPolygon::NegVertexY


SFXPolygon::NegVertex
Negate the sign of the coordinates of a vertex.
[ public ]
SFXPolygonRef NegVertex(
    SInt16 index   // index of the vertex
);

Reference

SFXPolygon::AddVertex | SFXPolygon::SubVertex | SFXPolygon::MulVertex | SFXPolygon::DivVertex | SFXPolygon::ModVertex | SFXPolygon::NegVertexX | SFXPolygon::NegVertexY


SFXPolygon::NegVertexX
Negate the sign of the X coordinate of a vertex.
[ public ]
SFXPolygonRef NegVertexX(
    SInt16 index   // index of the vertex
);

Reference

SFXPolygon::AddVertexX | SFXPolygon::SubVertexX | SFXPolygon::MulVertexX | SFXPolygon::DivVertexX | SFXPolygon::ModVertexX | SFXPolygon::NegVertex | SFXPolygon::NegVertexY


SFXPolygon::NegVertexY
Negate the sign of the Y coordinate of a vertex.
[ public ]
SFXPolygonRef NegVertexY(
    SInt16 index   // index of the vertex
);

Reference

SFXPolygon::AddVertexY | SFXPolygon::SubVertexY | SFXPolygon::MulVertexY | SFXPolygon::DivVertexY | SFXPolygon::ModVertexY | SFXPolygon::NegVertex | SFXPolygon::NegVertexX


SFXPolygon::Normalize
Nprmalize the polygon.
[ public ]
SFXPolygonRef Normalize(Void);

Description

Do nothing.


SFXPolygon::Offset
Add the specified value to the coordinates of all the vertices and move this polygon.
[ public ]
SFXPolygonRef Offset(
    SFXGridConstRef param   // value to add to the coordinates of all the vertices
);
[ public ]
SFXPolygonRef Offset(
    SInt16 x   // value to add to the X coordinate of all the vertices
    SInt16 y   // value to add to the Y coordinate of all the vertices
);

Reference

SFXPolygon::Unoffset | operator- | operator+


SFXPolygon::Set
Set the polygon.
[ public ]
SFXPolygonRef Set(
    SFXPolygonConstRef param   // polygon to set
);
[ public ]
SFXPolygonRef Set(
    SFXPixelPtr vertex   // array of vertices to set
    SInt16 length        // number of vertices to set
);
[ public ]
SFXPolygonRef Set(
    SFXPolylineConstRef polyline   // polyline to set
);

Reference

SFXPolygon::operator=


SFXPolygon::SetLength
Set the number of vertices.
[ public ]
SFXPolygonRef SetLength(
    SInt16 param   // number of vertices to set
);

Reference

SFXPolygon::GetLength


SFXPolygon::SetVertex
Set the coordinates of a vertex (vertices).
[ public ]
SFXPolygonRef SetVertex(
    SFXPixelPtr param   // array of vertices to set
);
[ public ]
SFXPolygonRef SetVertex(
    SInt16 index             // index of the vertex to set
    SFXPixelConstRef value   // coordinates of the vertex to set
);
[ public ]
SFXPolygonRef SetVertex(
    SInt16 index   // index of the vertex to set
    SInt16 x       // X coordinate of the vertex to set
    SInt16 y       // Y coordinate of the vertex to set
);

Reference

SFXPolygon::GetVertex | SFXPolygon::SetVertexX | SFXPolygon::SetVertexY


SFXPolygon::SetVertexX
Set the X coordinate of the specified vertex.
[ public ]
SFXPolygonRef SetVertexX(
    SInt16 index   // index of the vertex to set
    SInt16 value   // X coordinate of the vertex to set
);

Reference

SFXPolygon::GetVertexX | SFXPolygon::SetVertex | SFXPolygon::SetVertexY


SFXPolygon::SetVertexY
Set the Y coordinate of the specified vertex.
[ public ]
SFXPolygonRef SetVertexY(
    SInt16 index   // index of the vertex to set
    SInt16 value   // Y coordinate of the vertex to set
);

Reference

SFXPolygon::GetVertexY | SFXPolygon::SetVertex | SFXPolygon::SetVertexX


SFXPolygon::SubVertex
Subtract the specified value from the coordinates of a vertex.
[ public ]
SFXPolygonRef SubVertex(
    SInt16 index             // index of the vertex
    SFXPixelConstRef value   // value to subtract from the coordinates of the vertex
);
[ public ]
SFXPolygonRef SubVertex(
    SInt16 index   // index of the vertex
    SInt16 x       // value to subtract from the X coordinate of the vertex
    SInt16 y       // value to subtract from the Y coordinate of the vertex
);

Reference

SFXPolygon::AddVertex | SFXPolygon::SubVertexX | SFXPolygon::SubVertexY | SFXPolygon::MulVertex | SFXPolygon::DivVertex | SFXPolygon::ModVertex | SFXPolygon::NegVertex


SFXPolygon::SubVertexX
Subtract the specified value from the X coordinate of a vertex.
[ public ]
SFXPolygonRef SubVertexX(
    SInt16 index   // index of the vertex
    SInt16 value   // value to subtract from the X coordinate of the vertex
);

Reference

SFXPolygon::AddVertexX | SFXPolygon::SubVertex | SFXPolygon::SubVertexY | SFXPolygon::MulVertexX | SFXPolygon::DivVertexX | SFXPolygon::ModVertexX | SFXPolygon::NegVertexX


SFXPolygon::SubVertexY
Subtract the specified value from the Y coordinate of a vertex.
[ public ]
SFXPolygonRef SubVertexY(
    SInt16 index   // index of the vertex
    SInt16 value   // value to subtract from the Y coordinate of the vertex
);

Reference

SFXPolygon::AddVertexY | SFXPolygon::SubVertex | SFXPolygon::SubVertexX | SFXPolygon::MulVertexY | SFXPolygon::DivVertexY | SFXPolygon::ModVertexY | SFXPolygon::NegVertexY


SFXPolygon::Unoffset
Subtract the specified value from the coordinates of all the vertices and move this polygon.
[ public ]
SFXPolygonRef Unoffset(
    SFXGridConstRef param   // value to subtract from the coordinates of all the vertices
);
[ public ]
SFXPolygonRef Unoffset(
    SInt16 x   // value to subtract from the X coordinate of all the vertices
    SInt16 y   // value to subtract from the Y coordinate of all the vertices
);

Reference

SFXPolygon::Offset | operator- | operator+


SFXPolygon::ZeroInstance
Get the instance that represents 0.
[ public, static ]
SFXPolygonConstRef ZeroInstance(Void);

Description

This function returns the 0 instance, which means that 0 or null is set to all the member variables of its corresponding AtomRec struct.

Example

SFXPixel vertex[] = {
    SFXPixel(40, 40),
    SFXPixel(40, 60),
    SFXPixel(50, 30),
    SFXPixel(60, 20),
    SFXPixel(30, 30)
};

SFXPolygon polygon;

// set polygon
polygon.Set(vertex, lengthof(vertex));

// get number of vertices
TRACE("Length = %d", polygon.GetLength()); // Length = 5

// initialize polygon
polygon = SFXPolygon::ZeroInstance();

// get number of vertices
TRACE("Length = %d", polygon.GetLength());  // Length = 0

Reference

SFXPolygon::AtomRec


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

Reference

SFXPolygon::AtomRec


interface_cast
Convert the SFXPolygon into AEEPolygon.
[ public, friend ]
AEEPolygon * interface_cast(
    SFXPolygon * param   // polygon to cast
);
[ public, friend ]
AEEPolygon const * interface_cast(
    SFXPolygon const * param   // polygon to cast
);

SFXPolygon::operator=
Assign the polygon.
[ public ]
SFXPolygonRef operator=(
    SFXPolygonConstRef param   // source polygon
);

Reference

SFXPolygon::Set


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

Return value

  • If yes: true
  • Otherwise: false

Reference

SFXPolygon::Equals | operator!=


SFXPolygon::operator[]
Get the coordinates of the specified vertex.
[ public, const ]
SFXPixelRef operator[](
    SInt16 index   // index of the vertex
);

Reference

SFXPolygon::GetVertex | SFXPolygon::SetVertex


SFXPolygon::operator-=
Subtract the specified value from the coordinates of all the vertices and move this polygon.
[ public ]
SFXPolygonRef operator-=(
    SFXGridConstRef param   // value to subtract from the coordinates of all the vertices
);

Reference

SFXPolygon::Unoffset | operator- | SFXPolygon::operator+=


operator-
Subtract the specified value from the coordinates of all the vertices of a polygon and move this polygon.
[ public, friend ]
SFXPolygon operator-(
    SFXPolygonConstRef left   // polygon to move
    SFXGridConstRef right     // value to subtract from the coordinates of all the vertices of the polygon
);

Reference

SFXPolygon::Unoffset | SFXPolygon::operator-= | operator+


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

Return value

  • If yes: true
  • Otherwise: false

Reference

SFXPolygon::Equals | operator==


SFXPolygon::operator+=
Add the specified value to the coordinates of all the vertices and move this polygon.
[ public ]
SFXPolygonRef operator+=(
    SFXGridConstRef param   // value to add to the coordinates of all the vertices
);

Reference

SFXPolygon::Offset | SFXPolygon::operator-= | operator+


operator+
Add the specified value to the coordinates of all the vertices of a polygon and move this polygon.
[ public, friend ]
SFXPolygon operator+(
    SFXPolygonConstRef left   // polygon to move
    SFXGridConstRef right     // value to add to the coordinates of all the vertices of the polygon
);

Reference

SFXPolygon::Offset | operator- | SFXPolygon::operator+=


SFXPolygon::AtomRec
Structure that represents a polygon.
struct AtomRec {
  SInt16                length;  // number of vertices
  SFXPixel::AtomRecPtr  vertex;  // array of vertices
};