7#ifndef __HDI_CORE_ANNOTATE__
8#define __HDI_CORE_ANNOTATE__
10#if defined(HDI_CORE_AIP_MODE)
33 typedef std::vector<Point> PointVector;
34 typedef std::vector<SegPoint> SegPointVector;
133 bool rect(
const Rect& rect_,
const bool fill_ =
false);
155 bool polygon(
const PointVector& points_,
const bool fill_ =
false);
166 bool bezier(
const SegPointVector& segPts_,
const bool fill_ =
false);
191 bool image(
const byte*
const png_,
const uint32_t pngSize_,
const Point& pt_);
193 #if HDI_CORE_COMPILE_AI29_PLUS
221 #if HDI_CORE_COMPILE_AI29_PLUS
Describes an angle, and allows for easy conversion between various units.
Definition hdicoreAngle.h:26
Describes an RGB color, with opacity, typically for UI purposes.
Definition hdicoreColor.h:34
Font class to allow for easy font manipulation.
Definition hdicoreFont.h:183
Describes a point in the 2-dimensional (x,y) coordinate system, typically in an Illustrator document ...
Definition hdicorePoint.h:38
Contains Point and Size objects to describe a rectangle that exists at a specific point of given dime...
Definition hdicoreRect.h:34
Describes a segment point of a bezier path, typically in an Illustrator document view.
Definition hdicoreSegPoint.h:20
Contains a width and height for a rectangular shape.
Definition hdicoreSize.h:25
Header file for describing angles.
Header file for describing plugin UI colors.
Header file for describing rectangles.
Header file for path segment point manipulation.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
BoundsPinPointType
These allow for simpler art transformation/bounds metadata access.
Definition hdicoreTypes.h:794
ParagraphJustification
Indicates how text should be justified for a text art object.
Definition hdicoreTypes.h:377
Organizes all annotation drawing functions into one namespace, each of which will only perform their ...
Definition hdicoreAnnotate.h:32
bool dashedLine(const Point &start_, const Point &end_, const double dash_, const double gap_)
Draws a dashed line with the given end points and dash specs.
bool rect(const Rect &rect_, const bool fill_=false)
Draws a rectangle with the given coordinates and fill.
bool image(const int16_t imgID_, const Point &pt_)
Draws an image at the given point.
Color color()
Gets the current annotation color.
bool textAtBaseline(const std::string &text_, const Point &pt_)
Draws horizontal text with the current font and left justification.
bool imageUnscaled(const byte *const png_, const uint32_t pngSize_, const Point &pt_)
Draws an image from its raw PNG data at the given point, unscaled.
void setFontType(const FontType font_)
Sets the current font for annotation text art.
void setLineWidth(const double width_)
Sets the line width used when drawing paths or unfilled objects.
bool text(const std::string &text_, const Point &pt_, const TextConfig &config_=TextConfig())
Draws text with the current font and given config.
bool polygon(const PointVector &points_, const bool fill_=false)
Draws a polygon constructed of the given points.
void setAntialias(const bool aa_)
Sets the state of antialiased drawing for the current annotation context.
bool ellipse(const Rect &bounds_, const bool fill_=false)
Draws an ellipse within the given rectangular bounds.
FontType
Describes the type of font to use when annotating text; see also setFontType()
Definition hdicoreAnnotate.h:40
bool antialias()
Gets the state of antialiased drawing for the current annotation context.
void setColor(const Color &color_)
Sets the current annotation color.
void invalidateAll()
Loops through all views of the current document and invalidates their annotations.
double fontSize()
Gets the current font size for annotation text art.
void setFont(const Font &font_)
Sets the current font for annotation text art.
bool bezier(const SegPointVector &segPts_, const bool fill_=false)
Draws a bezier from the given segment points.
void setFontSize(const double size_)
Sets the current font size for annotation text art.
Size textSize(const std::string &text_, const TextConfig &config_=TextConfig())
Gets the bounds for the given text at the origin.
bool line(const Point &start_, const Point &end_)
Draws a line with the given end points.
double lineWidth()
Gets the line width used when drawing paths or unfilled objects.
std::unique_ptr< Font > font()
Gets the current font for annotation text art.
A sort of parameter block struct to assist in passing options to text drawing and text calculation fu...
Definition hdicoreAnnotate.h:59
Angle rotationAngle
When drawing text, used to specify the rotation angle (defaults to zero degrees)
Definition hdicoreAnnotate.h:69
BoundsPinPointType rotationPin
When drawing text, used to specify the pin point of rotation (if rotationAngle is non-zero,...
Definition hdicoreAnnotate.h:83
ParagraphJustification justification
When drawing text, used to specify the justification (can only be JustifyLeft, JustifyCenter,...
Definition hdicoreAnnotate.h:64
bool hasCJK
Whether the text has any Chinese, Japanese, or Korean characters (which defaults to false and will af...
Definition hdicoreAnnotate.h:89
Point rotationPoint
When drawing text, used to specify the x/y point of rotation (if rotationAngle is non-zero),...
Definition hdicoreAnnotate.h:76