Hot Door CORE 0.8.3
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
Typedefs | Functions
hdi::core::draw Namespace Reference

Organizes all primitive shape drawing functionality into one namespace for convenience. More...

Typedefs

typedef std::vector< ArtboardPointArtboardPointVector
 

Functions

std::unique_ptr< Artpoint (const ArtboardPoint &loc_, const Art *const group_=NULL)
 Draws a single segment point at a given location in the current document.
 
std::unique_ptr< Artline (const ArtboardPoint &start_, const ArtboardPoint &end_, const PathStyle &style_, const Art *const group_=NULL)
 Draws a line in group_ from start_ to end_.
 
std::unique_ptr< Artline (const ArtboardPoint &start_, const ArtboardPoint &end_, const Art *const group_=NULL)
 Draws a line in group_ from start_ to end_.
 
std::unique_ptr< Artrect (const ArtboardRect &rect_, const PathStyle &style_, const Art *const group_=NULL)
 Draws the rectangle indicated by rect_ in group_.
 
std::unique_ptr< Artrect (const ArtboardRect &rect_, const Art *const group_=NULL)
 Draws the rectangle indicated by rect_ in group_.
 
std::unique_ptr< ArtroundedRect (const ArtboardRect &rect_, const double radius_, const PathStyle &style_, const Art *const group_=NULL)
 Draws the rounded rectangle indicated by rect_ and radius_ in group_.
 
std::unique_ptr< ArtroundedRect (const ArtboardRect &rect_, const double radius_, const Art *const group_=NULL)
 Draws the rounded rectangle indicated by rect_ and radius_ in group_.
 
std::unique_ptr< ArtchamferedRect (const ArtboardRect &rect_, const double dist_, const PathStyle &style_, const Art *const group_=NULL)
 Draws the chamfered rectangle indicated by rect_ and dist_ in group_.
 
std::unique_ptr< ArtchamferedRect (const ArtboardRect &rect_, const double dist_, const Art *const group_=NULL)
 Draws the chamfered rectangle indicated by rect_ and dist_ in group_.
 
std::unique_ptr< Artpolygon (const ArtboardPointVector &points_, const PathStyle &style_, const Art *const group_=NULL)
 Draws a polygon from a series of points.
 
std::unique_ptr< Artpolygon (const ArtboardPointVector &points_, const Art *const group_=NULL)
 Draws a polygon from a series of points.
 
std::unique_ptr< ArtregularPolygon (const ArtboardPoint &center_, const double radius_, const int16_t sides_, const PathStyle &style_, const Art *const group_=NULL)
 Draws a regular polygon of a given radius with a given number of sides at a given point.
 
std::unique_ptr< ArtregularPolygon (const ArtboardPoint &center_, const double radius_, const int16_t sides_, const Art *const group_=NULL)
 Draws a regular polygon of a given radius with a given number of sides at a given point.
 
std::unique_ptr< ArtregularPolygon (const ArtboardPoint &center_, const ArtboardPoint &vertex_, const int16_t sides_, const PathStyle &style_, const Art *const group_=NULL)
 Draws a regular polygon with a given number of sides at a given point, extending to a given vertex point (the center often being the click point and the vertex often being the cursor)
 
std::unique_ptr< ArtregularPolygon (const ArtboardPoint &center_, const ArtboardPoint &vertex_, const int16_t sides_, const Art *const group_=NULL)
 Draws a regular polygon with a given number of sides at a given point, extending to a given vertex point (the center often being the click point and the vertex often being the cursor)
 
std::unique_ptr< Artellipse (const ArtboardPoint &source_, const double width_, const double height_, const bool centered_, const PathStyle &style_, const Art *const group_=NULL)
 Draws an ellipse from source_ of width_ and height_ in group_ (centered_ determines where source_ is... see arguments list)
 
std::unique_ptr< Artellipse (const ArtboardPoint &source_, const double width_, const double height_, const bool centered_, const Art *const group_=NULL)
 Draws an ellipse from source_ of width_ and height_ in group_ (centered_ determines where source_ is... see arguments list)
 
std::unique_ptr< Artstar (const ArtboardPoint &center_, const uint16_t points_, const double innerRadius_, const double outerRadius_, const PathStyle &style_, const Art *const group_=NULL)
 Draws a star with a given number of points, radii, etc. at a given point.
 
std::unique_ptr< Artstar (const ArtboardPoint &center_, const uint16_t points_, const double innerRadius_, const double outerRadius_, const Art *const group_=NULL)
 Draws a star with a given number of points, radii, etc. at a given point.
 
std::unique_ptr< Arttriangle (const ArtboardPoint &center_, const double width_, const PathStyle &style_, const Art *const group_=NULL)
 Draws an equilateral triangle of a given (base) width at a given point.
 
std::unique_ptr< Arttriangle (const ArtboardPoint &center_, const double width_, const Art *const group_=NULL)
 Draws an equilateral triangle of a given (base) width at a given point.
 
std::unique_ptr< ArtshortestArc (const ArtboardPoint &center_, const ArtboardPoint &start_, const ArtboardPoint &end_, const PathStyle &style_, const Art *const group_=NULL)
 Draws an arc segment (of a circle), whichever direction is the shortest length.
 
std::unique_ptr< ArtshortestArc (const ArtboardPoint &center_, const ArtboardPoint &start_, const ArtboardPoint &end_, const Art *const group_=NULL)
 Draws an arc segment (of a circle), whichever direction is the shortest length.
 
std::unique_ptr< ArtlongestArc (const ArtboardPoint &center_, const ArtboardPoint &start_, const ArtboardPoint &end_, const PathStyle &style_, const Art *const group_=NULL)
 Draws an arc segment (of a circle), whichever direction is the longest length.
 
std::unique_ptr< ArtlongestArc (const ArtboardPoint &center_, const ArtboardPoint &start_, const ArtboardPoint &end_, const Art *const group_=NULL)
 Draws an arc segment (of a circle), whichever direction is the longest length.
 
std::unique_ptr< Artarc (const ArtboardPoint &center_, const ArtboardPoint &start_, const ArtboardPoint &end_, const PathStyle &style_, const Art *const group_=NULL)
 Draws an arc segment (of a circle)
 
std::unique_ptr< Artarc (const ArtboardPoint &center_, const ArtboardPoint &start_, const ArtboardPoint &end_, const Art *const group_=NULL)
 Draws an arc segment (of a circle)
 
std::unique_ptr< Arttext (const std::string &text_, const ArtboardPoint &where_, const std::string &fontName_, const double fontSize_, const ParagraphJustification just_, const ArtColor &color_, const Art *const group_=NULL)
 Draws text at a given point of a given font, size, justification, color, etc.
 
std::unique_ptr< Arttext (const std::string &text_, const ArtboardPoint &where_, const Font &font_, const double fontSize_, const ParagraphJustification just_, const ArtColor &color_, const Art *const group_=NULL)
 Draws text at a given point of a given font, size, justification, color, etc.
 

Detailed Description

Organizes all primitive shape drawing functionality into one namespace for convenience.

Function Documentation

◆ arc() [1/2]

std::unique_ptr< Art > hdi::core::draw::arc ( const ArtboardPoint center_,
const ArtboardPoint start_,
const ArtboardPoint end_,
const Art *const  group_ = NULL 
)

Draws an arc segment (of a circle)

Author
GW
Date
08/2013
Parameters
center_Center point of the circle (of which the arc is a segment)
start_First point at which the arc segment begins, also controls the radius (distance from center_)
end_Last point at which the arc segment ends
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Deprecated:
This function should not be used and will eventually be removed; use the shortestArc() or longestArc() function instead.
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ arc() [2/2]

std::unique_ptr< Art > hdi::core::draw::arc ( const ArtboardPoint center_,
const ArtboardPoint start_,
const ArtboardPoint end_,
const PathStyle style_,
const Art *const  group_ = NULL 
)

Draws an arc segment (of a circle)

Author
GW
Date
08/2013
Parameters
center_Center point of the circle (of which the arc is a segment)
start_First point at which the arc segment begins, also controls the radius (distance from center_)
end_Last point at which the arc segment ends
style_Style for the new arc
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Deprecated:
This function should not be used and will eventually be removed; use the shortestArc() or longestArc() function instead.
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ chamferedRect() [1/2]

std::unique_ptr< Art > hdi::core::draw::chamferedRect ( const ArtboardRect rect_,
const double  dist_,
const Art *const  group_ = NULL 
)

Draws the chamfered rectangle indicated by rect_ and dist_ in group_.

Author
GW
Date
08/2013
Parameters
rect_Chamfered rectangle to draw
dist_Distance inward from the corners at which the chamfer will begin
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ chamferedRect() [2/2]

std::unique_ptr< Art > hdi::core::draw::chamferedRect ( const ArtboardRect rect_,
const double  dist_,
const PathStyle style_,
const Art *const  group_ = NULL 
)

Draws the chamfered rectangle indicated by rect_ and dist_ in group_.

Author
GW
Date
08/2013
Parameters
rect_Chamfered rectangle to draw
dist_Distance inward from the corners at which the chamfer will begin
style_Style for the new rect
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ ellipse() [1/2]

std::unique_ptr< Art > hdi::core::draw::ellipse ( const ArtboardPoint source_,
const double  width_,
const double  height_,
const bool  centered_,
const Art *const  group_ = NULL 
)

Draws an ellipse from source_ of width_ and height_ in group_ (centered_ determines where source_ is... see arguments list)

Author
GW
Date
08/2013
Parameters
source_Source point for the ellipse; centered_ determines whether this is the top-left or the center of the ellipse
width_Width of the ellipse
height_Height of the ellipse
centered_Whether the ellipse is centered on source_
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ ellipse() [2/2]

std::unique_ptr< Art > hdi::core::draw::ellipse ( const ArtboardPoint source_,
const double  width_,
const double  height_,
const bool  centered_,
const PathStyle style_,
const Art *const  group_ = NULL 
)

Draws an ellipse from source_ of width_ and height_ in group_ (centered_ determines where source_ is... see arguments list)

Author
GW
Date
08/2013
Parameters
source_Source point for the ellipse; centered_ determines whether this is the top-left or the center of the ellipse
width_Width of the ellipse
height_Height of the ellipse
centered_Whether the ellipse is centered on source_
style_Style for the new ellipse
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ line() [1/2]

std::unique_ptr< Art > hdi::core::draw::line ( const ArtboardPoint start_,
const ArtboardPoint end_,
const Art *const  group_ = NULL 
)

Draws a line in group_ from start_ to end_.

Author
GW
Date
08/2013
Parameters
start_Start point for the line
end_End point for the line
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ line() [2/2]

std::unique_ptr< Art > hdi::core::draw::line ( const ArtboardPoint start_,
const ArtboardPoint end_,
const PathStyle style_,
const Art *const  group_ = NULL 
)

Draws a line in group_ from start_ to end_.

Author
GW
Date
08/2013
Parameters
start_Start point for the line
end_End point for the line
style_Style for the new line
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ longestArc() [1/2]

std::unique_ptr< Art > hdi::core::draw::longestArc ( const ArtboardPoint center_,
const ArtboardPoint start_,
const ArtboardPoint end_,
const Art *const  group_ = NULL 
)

Draws an arc segment (of a circle), whichever direction is the longest length.

Author
GW
Date
12/2023
Parameters
center_Center point of the circle (of which the arc is a segment)
start_First point at which the arc segment begins, also controls the radius (distance from center_)
end_Last point at which the arc segment ends
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ longestArc() [2/2]

std::unique_ptr< Art > hdi::core::draw::longestArc ( const ArtboardPoint center_,
const ArtboardPoint start_,
const ArtboardPoint end_,
const PathStyle style_,
const Art *const  group_ = NULL 
)

Draws an arc segment (of a circle), whichever direction is the longest length.

Author
GW
Date
12/2023
Parameters
center_Center point of the circle (of which the arc is a segment)
start_First point at which the arc segment begins, also controls the radius (distance from center_)
end_Last point at which the arc segment ends
style_Style for the new arc
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ point()

std::unique_ptr< Art > hdi::core::draw::point ( const ArtboardPoint loc_,
const Art *const  group_ = NULL 
)

Draws a single segment point at a given location in the current document.

Author
GW
Date
08/2013
Parameters
loc_Location for the segment point
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ polygon() [1/2]

std::unique_ptr< Art > hdi::core::draw::polygon ( const ArtboardPointVector &  points_,
const Art *const  group_ = NULL 
)

Draws a polygon from a series of points.

Author
GW
Date
08/2013
Parameters
points_Vector of points for the polygon
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ polygon() [2/2]

std::unique_ptr< Art > hdi::core::draw::polygon ( const ArtboardPointVector &  points_,
const PathStyle style_,
const Art *const  group_ = NULL 
)

Draws a polygon from a series of points.

Author
GW
Date
08/2013
Parameters
points_Vector of points for the polygon
style_Style for the new art
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ rect() [1/2]

std::unique_ptr< Art > hdi::core::draw::rect ( const ArtboardRect rect_,
const Art *const  group_ = NULL 
)

Draws the rectangle indicated by rect_ in group_.

Author
GW
Date
08/2013
Parameters
rect_Rectangle to draw
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ rect() [2/2]

std::unique_ptr< Art > hdi::core::draw::rect ( const ArtboardRect rect_,
const PathStyle style_,
const Art *const  group_ = NULL 
)

Draws the rectangle indicated by rect_ in group_.

Author
GW
Date
08/2013
Parameters
rect_Rectangle to draw
style_Style for the new rect
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ regularPolygon() [1/4]

std::unique_ptr< Art > hdi::core::draw::regularPolygon ( const ArtboardPoint center_,
const ArtboardPoint vertex_,
const int16_t  sides_,
const Art *const  group_ = NULL 
)

Draws a regular polygon with a given number of sides at a given point, extending to a given vertex point (the center often being the click point and the vertex often being the cursor)

Author
GW
Date
06/2015
Parameters
center_Center point of the polygon
vertex_Vertex point for the polygon (controls radius)
sides_Number of sides for the polygon, in range [3,100]
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ regularPolygon() [2/4]

std::unique_ptr< Art > hdi::core::draw::regularPolygon ( const ArtboardPoint center_,
const ArtboardPoint vertex_,
const int16_t  sides_,
const PathStyle style_,
const Art *const  group_ = NULL 
)

Draws a regular polygon with a given number of sides at a given point, extending to a given vertex point (the center often being the click point and the vertex often being the cursor)

Author
GW
Date
06/2015
Parameters
center_Center point of the polygon
vertex_Vertex point for the polygon (controls radius)
sides_Number of sides for the polygon, in range [3,100]
style_Style for the new art
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ regularPolygon() [3/4]

std::unique_ptr< Art > hdi::core::draw::regularPolygon ( const ArtboardPoint center_,
const double  radius_,
const int16_t  sides_,
const Art *const  group_ = NULL 
)

Draws a regular polygon of a given radius with a given number of sides at a given point.

Author
GW
Date
06/2015
Parameters
center_Center point of the polygon
radius_Radius of the polygon, in points
sides_Number of sides for the polygon, in range [3,100]
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ regularPolygon() [4/4]

std::unique_ptr< Art > hdi::core::draw::regularPolygon ( const ArtboardPoint center_,
const double  radius_,
const int16_t  sides_,
const PathStyle style_,
const Art *const  group_ = NULL 
)

Draws a regular polygon of a given radius with a given number of sides at a given point.

Author
GW
Date
06/2015
Parameters
center_Center point of the polygon
radius_Radius of the polygon, in points
sides_Number of sides for the polygon, in range [3,100]
style_Style for the new art
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ roundedRect() [1/2]

std::unique_ptr< Art > hdi::core::draw::roundedRect ( const ArtboardRect rect_,
const double  radius_,
const Art *const  group_ = NULL 
)

Draws the rounded rectangle indicated by rect_ and radius_ in group_.

Author
GW
Date
08/2013
Parameters
rect_Rounded rectangle to draw
radius_Radius for the corners of the rectangle
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ roundedRect() [2/2]

std::unique_ptr< Art > hdi::core::draw::roundedRect ( const ArtboardRect rect_,
const double  radius_,
const PathStyle style_,
const Art *const  group_ = NULL 
)

Draws the rounded rectangle indicated by rect_ and radius_ in group_.

Author
GW
Date
08/2013
Parameters
rect_Rounded rectangle to draw
radius_Radius for the corners of the rectangle
style_Style for the new rect
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ shortestArc() [1/2]

std::unique_ptr< Art > hdi::core::draw::shortestArc ( const ArtboardPoint center_,
const ArtboardPoint start_,
const ArtboardPoint end_,
const Art *const  group_ = NULL 
)

Draws an arc segment (of a circle), whichever direction is the shortest length.

Author
GW
Date
12/2023
Parameters
center_Center point of the circle (of which the arc is a segment)
start_First point at which the arc segment begins, also controls the radius (distance from center_)
end_Last point at which the arc segment ends
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ shortestArc() [2/2]

std::unique_ptr< Art > hdi::core::draw::shortestArc ( const ArtboardPoint center_,
const ArtboardPoint start_,
const ArtboardPoint end_,
const PathStyle style_,
const Art *const  group_ = NULL 
)

Draws an arc segment (of a circle), whichever direction is the shortest length.

Author
GW
Date
12/2023
Parameters
center_Center point of the circle (of which the arc is a segment)
start_First point at which the arc segment begins, also controls the radius (distance from center_)
end_Last point at which the arc segment ends
style_Style for the new arc
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ star() [1/2]

std::unique_ptr< Art > hdi::core::draw::star ( const ArtboardPoint center_,
const uint16_t  points_,
const double  innerRadius_,
const double  outerRadius_,
const Art *const  group_ = NULL 
)

Draws a star with a given number of points, radii, etc. at a given point.

Author
GW
Date
08/2013
Parameters
center_Center point for the star
points_Number of points (tips) in the star
innerRadius_Radius of the star body
outerRadius_Radius of the star tips
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ star() [2/2]

std::unique_ptr< Art > hdi::core::draw::star ( const ArtboardPoint center_,
const uint16_t  points_,
const double  innerRadius_,
const double  outerRadius_,
const PathStyle style_,
const Art *const  group_ = NULL 
)

Draws a star with a given number of points, radii, etc. at a given point.

Author
GW
Date
08/2013
Parameters
center_Center point for the star
points_Number of points (tips) in the star
innerRadius_Radius of the star body
outerRadius_Radius of the star tips
style_Style for the new star
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ text() [1/2]

std::unique_ptr< Art > hdi::core::draw::text ( const std::string &  text_,
const ArtboardPoint where_,
const Font font_,
const double  fontSize_,
const ParagraphJustification  just_,
const ArtColor color_,
const Art *const  group_ = NULL 
)

Draws text at a given point of a given font, size, justification, color, etc.

Author
GW
Date
08/2013
Parameters
text_Value of the string to draw, as UTF-8
where_Point at which to place it
fontName_Font to use
fontSize_Font size in points (in range 0.1 to 1296.0)
just_Justification
color_Color for the art
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ text() [2/2]

std::unique_ptr< Art > hdi::core::draw::text ( const std::string &  text_,
const ArtboardPoint where_,
const std::string &  fontName_,
const double  fontSize_,
const ParagraphJustification  just_,
const ArtColor color_,
const Art *const  group_ = NULL 
)

Draws text at a given point of a given font, size, justification, color, etc.

Author
GW
Date
08/2013
Parameters
text_Value of the string to draw, as UTF-8
where_Point at which to place it
fontName_Name of the font to use (if not found it will be drawn with the default font for the current locale), as UTF-8
fontSize_Font size in points (in range 0.1 to 1296.0)
just_Justification
color_Color for the art
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ triangle() [1/2]

std::unique_ptr< Art > hdi::core::draw::triangle ( const ArtboardPoint center_,
const double  width_,
const Art *const  group_ = NULL 
)

Draws an equilateral triangle of a given (base) width at a given point.

Author
GW
Date
08/2013
Parameters
center_Center point for the triangle
width_Width of the base of the triangle
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.

◆ triangle() [2/2]

std::unique_ptr< Art > hdi::core::draw::triangle ( const ArtboardPoint center_,
const double  width_,
const PathStyle style_,
const Art *const  group_ = NULL 
)

Draws an equilateral triangle of a given (base) width at a given point.

Author
GW
Date
08/2013
Parameters
center_Center point for the triangle
width_Width of the base of the triangle
style_Style for the new triangle
group_Group the new art will go in (NULL for top of layer list)
Returns
The new Art object, or NULL for error
Warning
This function does not assume responsibility of the memory for the group_ argument.