All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::Layout::Shape Class Reference

#include <ContentTree.h>

+ Inheritance diagram for pdftron::Layout::Shape:

Public Types

enum  ShapeType {
  e_line = 1, e_line_arrow = 2, e_line_double_arrow = 3, e_rectangle = 4,
  e_rectangle_rounded_corners = 5, e_oval = 6, e_arrow = 7
}
 

Public Member Functions

 ~Shape ()
 
void Destroy ()
 
void SetType (ShapeType type)
 
ShapeType GetType ()
 
void SetWidth (double width)
 
double GetWidth ()
 
void SetHeight (double height)
 
double GetHeight ()
 
void SetRotation (double angle)
 
double GetRotation ()
 
void SetFlipHorizontal (bool value)
 
bool GetFlipHorizontal ()
 
void SetFlipVertical (bool value)
 
bool GetFlipVertical ()
 
void SetArrowHeadSize (double size)
 
double GetArrowHeadSize ()
 
void SetCornerRadius (double radius)
 
double GetCornerRadius ()
 
void SetBackgroundColor (int r, int g, int b)
 
void SetBackgroundImage (const UString &file_path)
 
void SetBackgroundImage (const Filters::Filter &filter)
 
void SetOutlineColor (int r, int g, int b)
 
void SetOutlineThickness (double thickness)
 
double GetOutlineThickness ()
 
ContentContainer GetTextBox ()
 
- Public Member Functions inherited from pdftron::Layout::ContentNode
 ~ContentNode ()
 
void Destroy ()
 
ContentNodeIterator GetContentNodeIterator ()
 
- Public Member Functions inherited from pdftron::Layout::ContentElement
 ~ContentElement ()
 
void Destroy ()
 
ElementRef< List > AsList () const
 
ElementRef< ListItem > AsListItem () const
 
ElementRef< ContentNode > AsContentNode () const
 
ElementRef< TextRun > AsTextRun () const
 
ElementRef< PageNumber > AsPageNumber () const
 
ElementRef< Shape > AsShape () const
 
ElementRef< Float > AsFloat () const
 
ElementRef< Chart > AsChart () const
 
ElementRef< Paragraph > AsParagraph () const
 
ElementRef< Table > AsTable () const
 
ElementRef< TableRow > AsTableRow () const
 
ElementRef< TableCell > AsTableCell () const
 
TextStyledElement GetTextStyledElement ()
 

Friends

class Paragraph
 
class ElementRef< Shape >
 

Additional Inherited Members

- Public Attributes inherited from pdftron::Layout::ContentElement
TRN_ContentElement m_impl
 
- Protected Member Functions inherited from pdftron::Layout::ContentNode
 ContentNode (TRN_ContentNode impl)
 
- Protected Member Functions inherited from pdftron::Layout::ContentElement
 ContentElement (TRN_ContentElement impl)
 

Detailed Description

A shape content element that can be inserted into a paragraph.

Shapes support geometry, rotation, fill/outline styling, optional background image, and an internal text box content container.

Definition at line 845 of file ContentTree.h.

Member Enumeration Documentation

Defines the supported shape types.

Enumerator
e_line 
e_line_arrow 
e_line_double_arrow 
e_rectangle 
e_rectangle_rounded_corners 
e_oval 
e_arrow 

Definition at line 856 of file ContentTree.h.

Constructor & Destructor Documentation

pdftron::Layout::Shape::~Shape ( )

Member Function Documentation

void pdftron::Layout::Shape::Destroy ( )
double pdftron::Layout::Shape::GetArrowHeadSize ( )

Get arrow head size in points.

Returns
The arrow head size in points.
double pdftron::Layout::Shape::GetCornerRadius ( )

Get rounded rectangle corner radius in points.

Returns
The corner radius in points.
bool pdftron::Layout::Shape::GetFlipHorizontal ( )

Get the shape horizontal flip state.

Returns
True if the shape is horizontally flipped.
bool pdftron::Layout::Shape::GetFlipVertical ( )

Get the shape vertical flip state.

Returns
True if the shape is vertically flipped.
double pdftron::Layout::Shape::GetHeight ( )

Get the shape height in points.

Returns
The shape height in points.
double pdftron::Layout::Shape::GetOutlineThickness ( )

Get the shape outline thickness in points.

Returns
The outline thickness in points.
double pdftron::Layout::Shape::GetRotation ( )

Get the shape rotation angle in degrees.

Returns
The rotation angle in degrees.
ContentContainer pdftron::Layout::Shape::GetTextBox ( )

Get the shape text box content container.

Returns
The shape text box content container.
ShapeType pdftron::Layout::Shape::GetType ( )

Gets the shape type.

Returns
The shape type.
double pdftron::Layout::Shape::GetWidth ( )

Get the shape width in points.

Returns
The shape width in points.
void pdftron::Layout::Shape::SetArrowHeadSize ( double  size)

Set arrow head size in points.

Applies to arrow shapes.

Parameters
sizeThe arrow head size in points.
void pdftron::Layout::Shape::SetBackgroundColor ( int  r,
int  g,
int  b 
)

Set the shape background color.

Parameters
rThe red component [0..255].
gThe green component [0..255].
bThe blue component [0..255].
void pdftron::Layout::Shape::SetBackgroundImage ( const UString &  file_path)

Set the shape background image from a file path.

Parameters
file_pathThe image file path.
void pdftron::Layout::Shape::SetBackgroundImage ( const Filters::Filter &  filter)

Set the shape background image from a filter.

Parameters
filterThe image filter.
void pdftron::Layout::Shape::SetCornerRadius ( double  radius)

Set rounded rectangle corner radius in points.

Parameters
radiusThe corner radius in points.
void pdftron::Layout::Shape::SetFlipHorizontal ( bool  value)

Set the shape horizontal flip.

Parameters
valueTrue to flip the shape horizontally.
void pdftron::Layout::Shape::SetFlipVertical ( bool  value)

Set the shape vertical flip.

Parameters
valueTrue to flip the shape vertically.
void pdftron::Layout::Shape::SetHeight ( double  height)

Set the shape height in points.

Parameters
heightThe shape height in points.
void pdftron::Layout::Shape::SetOutlineColor ( int  r,
int  g,
int  b 
)

Set the shape outline color.

Parameters
rThe red component [0..255].
gThe green component [0..255].
bThe blue component [0..255].
void pdftron::Layout::Shape::SetOutlineThickness ( double  thickness)

Set the shape outline thickness in points.

Parameters
thicknessThe outline thickness in points.
void pdftron::Layout::Shape::SetRotation ( double  angle)

Set the shape rotation angle in degrees.

Parameters
angleThe rotation angle in degrees.
void pdftron::Layout::Shape::SetType ( ShapeType  type)

Sets the shape type.

Parameters
typeThe shape type.
void pdftron::Layout::Shape::SetWidth ( double  width)

Set the shape width in points.

Parameters
widthThe shape width in points.

Friends And Related Function Documentation

friend class ElementRef< Shape >
friend

Definition at line 848 of file ContentTree.h.

friend class Paragraph
friend

Definition at line 847 of file ContentTree.h.


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