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;
129 bool rect(
const Rect& rect_,
const bool fill_ =
false);
151 bool polygon(
const PointVector& points_,
const bool fill_ =
false);
162 bool bezier(
const SegPointVector& segPts_,
const bool fill_ =
false);
187 bool image(
const byte*
const png_,
const uint32_t pngSize_,
const Point& pt_);
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:32
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
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
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 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 left justification.
bool polygon(const PointVector &points_, const bool fill_=false)
Draws a polygon constructed of the given points.
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
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.
Definition: hdicoreAnnotate.h:55
Angle rotationAngle
When drawing text, used to specify the rotation angle (defaults to zero degrees)
Definition: hdicoreAnnotate.h:65
BoundsPinPointType rotationPin
When drawing text, used to specify the pin point of rotation (if rotationAngle is non-zero,...
Definition: hdicoreAnnotate.h:79
ParagraphJustification justification
When drawing text, used to specify the justification (can only be JustifyLeft, JustifyCenter,...
Definition: hdicoreAnnotate.h:60
bool hasCJK
Whether the text has any Chinese, Japanese, or Korean characters (which defaults to false and will af...
Definition: hdicoreAnnotate.h:85
Point rotationPoint
When drawing text, used to specify the x/y point of rotation (if rotationAngle is non-zero),...
Definition: hdicoreAnnotate.h:72