Adobe.com
Contents Suites Classes Class Index Member Index

AIDrawArtSuite Struct Reference
[API Suite List]

These functions draw Illustrator artwork to an output port (drawing surface). More...

#include <AIDrawArt.h>

List of all members.

Public Attributes

AIAPI AIErr(* DrawArt )(AIDrawArtData *data, const AIColorConvertOptions &options)
 Draws artwork as specified.
AIAPI AIErr(* BeginDrawArt )(AIDrawArtData *data, const AIColorConvertOptions &options, AIDrawArtFlags flags)
 Establishes a temporary drawing surface whose color space matches the document space.
AIAPI AIErr(* EndDrawArt )(AIDrawArtData *data, const AIColorConvertOptions &options)
 Copies the contents of the temporary drawing surface to the final destination.
AIAPI AIErr(* DrawColorSwatch )(AIDrawColorData *data)
 Draws a color swatch.
AIAPI AIErr(* DrawHilite )(AIArtHandle art, AIRGBColor *color, float lineWidth)
 Draws the highlighting annotations for an art object.
AIAPI AIErr(* DrawThumbnail )(AIArtHandle art, void *port, AIRealRect *dstrect)
 Draws a thumbnail of an art object to the AGM port.
AIAPI AIErr(* CreateImagePort )(ai::uint32 width, ai::uint32 height, AIAGMPort **outRport)
 Creates an AGM port for an image of given dimensions.
AIAPI AIErr(* GetImagePixelData )(AIAGMPort *rport, const ai::uint8 **outPixedData, size_t *outLength, ai::uint32 *outWidth, ai::uint32 *outHeight)
 Retrieves the pixel data corresponding to the image created through CreateImagePort().
AIAPI AIErr(* DestroyImagePort )(AIAGMPort *rport)
 Destroys the supplied AIAGMPort.

Detailed Description

These functions draw Illustrator artwork to an output port (drawing surface).

The port can be a screen window, or it can be an offscreen drawing surface used to rasterize artwork.

The drawing options are controlled by values in an AIDrawArtData structure and related option structures AIColorConvertOptions and AIDrawArtFlags.

When drawing to a port whose color space does not match the document color space, bracket a sequence of calls to DrawArt() with calls to.BeginDrawArt() and EndDrawArt(). Examples are drawing a CMYK document to an RGB window, or an RGB document to a window with a different profile.


Member Data Documentation

Establishes a temporary drawing surface whose color space matches the document space.

Must be paired with a call to EndDrawArt() at the end of a sequence of calls DrawArt().

Parameters:
data A pointer to the structure that specifies an art object to be drawn, the object it is to be drawn into, and parameters affecting how it is to be drawn. Can be NULL.
options An AIColorConvertOptions object; see DrawArt().
flags A set of options that modify drawing behavior, a logical OR of AIDrawArtFlagBitPos values.
Note:
If you set the kAIDrawArtOPP flag to draw to an OPP port, the "begin" call temporarily changes the target port in the data structure. The call to EndDrawArt() restores the original port. In this case, the set of spot colors needed for the OPP port are determined from the art object specified in data, or from the entire document if no art object is specified.

Creates an AGM port for an image of given dimensions.

Parameters:
width Width of the image.
height Height of the image.
outRport [out] A buffer in which to return the new raster port.

Destroys the supplied AIAGMPort.

Parameters:
rport A pointer to the AGM port.

Draws artwork as specified.

Parameters:
data A pointer to the structure that specifies an art object to be drawn, the object it is to be drawn into, and parameters affecting how it is to be drawn.
options An AIColorConvertOptions object that sets the appropriate black preservation value--that is, whether a CMYK to RGB/Gray color transformation maps CMYK 0,0,0,1 to the darkest black:

  • By default, the operation uses the standard conversion, which never uses black preservation.
  • For export, the operation uses the black-preservation setting that is currently configured in the print and export preferences.
  • For preview, the operation uses the black-preservation setting that is currently configured in the screen-display preferences.

Draws a color swatch.

Color swatches are always assumed to be drawn for the purpose of screen display.

Parameters:
data A pointer to the structure that specifies an art object to be drawn, the object it is to be drawn into, and parameters affecting how it is to be drawn.
AIAPI AIErr(* AIDrawArtSuite::DrawHilite)(AIArtHandle art, AIRGBColor *color, float lineWidth)

Draws the highlighting annotations for an art object.

Call only in the response to an annotator's Draw Annotations message.

Parameters:
art The art object.
color The highlight color.
lineWidth The stroke width.
AIAPI AIErr(* AIDrawArtSuite::DrawThumbnail)(AIArtHandle art, void *port, AIRealRect *dstrect)

Draws a thumbnail of an art object to the AGM port.

Thumbnails are always assumed to be drawn for the purpose of screen display. No transformations are applied, and the image is drawn to fit into the destination rectangle.

Parameters:
art The art object, of type kRasterArt or kPlacedArt.
port A pointer to the AGM port.
dstrect The destination rectangle, a bounding box for the thumbnail image.

Copies the contents of the temporary drawing surface to the final destination.

Parameters:
data A pointer to the drawing data structure that was passed to the corresponding call to BeginDrawArt().
options The AIColorConvertOptions object that was passed to the corresponding call to BeginDrawArt().
AIAPI AIErr(* AIDrawArtSuite::GetImagePixelData)(AIAGMPort *rport, const ai::uint8 **outPixedData, size_t *outLength, ai::uint32 *outWidth, ai::uint32 *outHeight)

Retrieves the pixel data corresponding to the image created through CreateImagePort().

This is the read-only pixel data owned by the implementation; the caller should not allocate memory for the data. This pixel data is valid until you call DestroyImagePort() (see example). Data of a particular pixel is in the form of ARGB (alpha, red, green and blue). The total length of pixel data is equal to 4 * width * height.

                        //Example on how to call this method.
                        size_t length = 0;
                        const ai::uint8* pixelData = NULL;
                        AIErr error = sAIDrawArt->GetImagePixelData(rport, &pixelData, &length, NULL, NULL);
Parameters:
rport A pointer to the AGM port.
outPixedData [out] A buffer in which to return a pointer to the pixel data bytes.
outLength [out] A buffer in which to return the length of the pixel data in bytes.
outWidth [out] A buffer in which to return the width of the image, or NULL if this information is not required.
outHeight [out] A buffer in which to return the height of the image, or NULL if this information is not required.

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


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2016 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks