![]() |
Hot Door CORE 0.8.3
Adobe® Illustrator® Plug-in Library
|
Organizes all annotation drawing functions into one namespace, each of which will only perform their drawing task(s) if called from within an Annotator callback. More...
Classes | |
| struct | TextConfig |
Typedefs | |
| typedef std::vector< Point > | PointVector |
| typedef std::vector< SegPoint > | SegPointVector |
Enumerations | |
| enum | FontType { DefaultFont , DialogFont , BoldDialogFont , ItalicDialogFont , BoldItalicDialogFont , PanelFont , BoldPanelFont , ItalicPanelFont , BoldItalicPanelFont } |
| Describes the type of font to use when annotating text; see also setFontType() | |
Functions | |
| bool | line (const Point &start_, const Point &end_) |
| Draws a line with the given end points. | |
| 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 | ellipse (const Rect &bounds_, const bool fill_=false) |
| Draws an ellipse within the given rectangular bounds. | |
| bool | polygon (const PointVector &points_, const bool fill_=false) |
| Draws a polygon constructed of the given points. | |
| bool | bezier (const SegPointVector &segPts_, const bool fill_=false) |
| Draws a bezier from the given segment points. | |
| bool | image (const int16_t imgID_, const Point &pt_) |
| Draws an image at the given point. | |
| bool | image (const byte *const png_, const uint32_t pngSize_, const Point &pt_) |
| Draws an image from its raw PNG data at the given point, scaled to the document DPI. | |
| 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. | |
| bool | text (const std::string &text_, const Point &pt_, const TextConfig &config_=TextConfig()) |
| Draws text with the current font and left justification. | |
| Color | color () |
| Gets the current annotation color. | |
| void | setColor (const Color &color_) |
| Sets the current annotation color. | |
| double | lineWidth () |
| Gets the line width used when drawing paths or unfilled objects. | |
| void | setLineWidth (const double width_) |
| Sets the line width used when drawing paths or unfilled objects. | |
| void | setFont (const Font &font_) |
| Sets the current font for annotation text art. | |
| void | setFontSize (const double size_) |
| Sets the current font size for annotation text art. | |
| std::unique_ptr< Font > | font () |
| Gets the current font for annotation text art. | |
| double | fontSize () |
| Gets the current font size for annotation text art. | |
| void | setFontType (const FontType font_) |
| Sets the current font for annotation text art. | |
| Size | textSize (const std::string &text_, const TextConfig &config_=TextConfig()) |
| Gets the bounds for the given text at the origin. | |
| void | invalidateAll () |
| Loops through all views of the current document and invalidates their annotations. | |
Organizes all annotation drawing functions into one namespace, each of which will only perform their drawing task(s) if called from within an Annotator callback.
| bool hdi::core::annotate::bezier | ( | const SegPointVector & | segPts_, |
| const bool | fill_ = false |
||
| ) |
Draws a bezier from the given segment points.
| segPts_ | Segment points of the bezier path |
| fill_ | Whether to fill it with the current color |
| Color hdi::core::annotate::color | ( | ) |
| bool hdi::core::annotate::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.
| start_ | Start point for the line |
| end_ | End point for the line |
| dash_ | Length of the dash components |
| gap_ | Length of the gap components (empty space between dashes) |
| bool hdi::core::annotate::ellipse | ( | const Rect & | bounds_, |
| const bool | fill_ = false |
||
| ) |
Draws an ellipse within the given rectangular bounds.
| bounds_ | Rectangle in which the ellipse fits |
| fill_ | Whether to fill it with the current color |
| std::unique_ptr< Font > hdi::core::annotate::font | ( | ) |
Gets the current font for annotation text art.
| double hdi::core::annotate::fontSize | ( | ) |
Gets the current font size for annotation text art.
| bool hdi::core::annotate::image | ( | const byte *const | png_, |
| const uint32_t | pngSize_, | ||
| const Point & | pt_ | ||
| ) |
Draws an image from its raw PNG data at the given point, scaled to the document DPI.
| png_ | Raw bytes of PNG data to be drawn |
| pngSize_ | Length of the buffer passed in png_ argument |
| pt_ | Point at which to draw the image |
| bool hdi::core::annotate::image | ( | const int16_t | imgID_, |
| const Point & | pt_ | ||
| ) |
Draws an image at the given point.
| imgID_ | Resource ID of the image to draw |
| pt_ | Point at which to draw the image |
| bool hdi::core::annotate::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.
| png_ | Raw bytes of PNG data to be drawn |
| pngSize_ | Length of the buffer passed in png_ argument |
| pt_ | Point at which to draw the image |
| void hdi::core::annotate::invalidateAll | ( | ) |
Loops through all views of the current document and invalidates their annotations.
Draws a line with the given end points.
| start_ | Start point for the line |
| end_ | End point for the line |
| double hdi::core::annotate::lineWidth | ( | ) |
Gets the line width used when drawing paths or unfilled objects.
| bool hdi::core::annotate::polygon | ( | const PointVector & | points_, |
| const bool | fill_ = false |
||
| ) |
Draws a polygon constructed of the given points.
| points_ | Vertex points of the polygon |
| fill_ | Whether to fill it with the current color |
| bool hdi::core::annotate::rect | ( | const Rect & | rect_, |
| const bool | fill_ = false |
||
| ) |
Draws a rectangle with the given coordinates and fill.
| rect_ | Rectangle to draw |
| fill_ | Whether to fill it with the current color |
| void hdi::core::annotate::setColor | ( | const Color & | color_ | ) |
Sets the current annotation color.
| color_ | New color for annotation art |
| void hdi::core::annotate::setFont | ( | const Font & | font_ | ) |
Sets the current font for annotation text art.
| font_ | New font for annotating |
| void hdi::core::annotate::setFontSize | ( | const double | size_ | ) |
Sets the current font size for annotation text art.
| size_ | New font size for the current annotation context |
| void hdi::core::annotate::setFontType | ( | const FontType | font_ | ) |
Sets the current font for annotation text art.
| font_ | New font for annotating |
| void hdi::core::annotate::setLineWidth | ( | const double | width_ | ) |
Sets the line width used when drawing paths or unfilled objects.
| width_ | The line width in document view points |
| bool hdi::core::annotate::text | ( | const std::string & | text_, |
| const Point & | pt_, | ||
| const TextConfig & | config_ = TextConfig() |
||
| ) |
Draws text with the current font and left justification.
| text_ | UTF-8 text to draw |
| pt_ | Top-left point at which to draw the text (before any of config_ arg is applied) |
| config_ | The configuration for other/advanced drawing options; pass in a default- constructed object to draw without any options applied |
| Size hdi::core::annotate::textSize | ( | const std::string & | text_, |
| const TextConfig & | config_ = TextConfig() |
||
| ) |
Gets the bounds for the given text at the origin.
| text_ | UTF-8 text for which bounds are needed |
| config_ | The configuration for other/advanced drawing options; pass in a default-constructed object to calculate without any options applied |