ColorBarAnnotation

Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation, com.aspose.pdf.PrinterMarkAnnotation

public final class ColorBarAnnotation extends PrinterMarkAnnotation

Class representing ColorBarAnnotation annotation. Property Color ignored, instead used ColorsOfCMYK color. On creation, the ratio of width and height determines the orientation of the annotation - horizontal or vertical. Next, it checks that the annotation rectangle is outside the TrimBox, and if not, then it is shifted to the nearest location outside the TrimBox, taking into account the orientation of the annotation. It is possible to reduce the width (height) so that the annotation fits outside the TrimBox. If there is no space for the layout, the width/height can be set to zero (in this case, the annotation is present on the page, but not displayed).

Constructors

ConstructorDescription
ColorBarAnnotation(Page page, Rectangle rect)Creates new ColorBar annotation on the specified page.
ColorBarAnnotation(Page page, Rectangle rect, int colorOfCMYK)Creates new ColorBar annotation on the specified page.

Methods

MethodDescription
getColorOfCMYK()Gets or sets color (one of cyan, magenta, yellow, black) for which the annotation is drawing.
setColorOfCMYK(int value)Gets or sets color (one of cyan, magenta, yellow, black) for which the annotation is drawing.
accept(AnnotationSelector visitor)Accepts visitor object to process the annotation.
getAnnotationType()Gets type of annotation.
changeAfterResize(Matrix transform)Update parameters and appearance, according to the matrix transform and moving outside of TrimBox if nesseary.

ColorBarAnnotation(Page page, Rectangle rect)

public ColorBarAnnotation(Page page, Rectangle rect)

Creates new ColorBar annotation on the specified page. Default ColorsOfCMYK.Black

Parameters:

ParameterTypeDescription
pagePageDocument’s page where annotation should be created.
rectRectangleRequired rectangle that sets annotation’s drawing area.

ColorBarAnnotation(Page page, Rectangle rect, int colorOfCMYK)

public ColorBarAnnotation(Page page, Rectangle rect, int colorOfCMYK)

Creates new ColorBar annotation on the specified page.

Parameters:

ParameterTypeDescription
pagePageDocument’s page where annotation should be created.
rectRectangleRequired rectangle that sets annotation’s drawing area.
colorOfCMYKintColor for which annotation drawing.

getColorOfCMYK()

public final int getColorOfCMYK()

Gets or sets color (one of cyan, magenta, yellow, black) for which the annotation is drawing.

Returns: int - ColorsOfCMYK element

setColorOfCMYK(int value)

public final void setColorOfCMYK(int value)

Gets or sets color (one of cyan, magenta, yellow, black) for which the annotation is drawing.

Parameters:

ParameterTypeDescription
valueintColorsOfCMYK element

accept(AnnotationSelector visitor)

public void accept(AnnotationSelector visitor)

Accepts visitor object to process the annotation.

Parameters:

ParameterTypeDescription
visitorAnnotationSelectorVisitor object.

getAnnotationType()

public AnnotationType getAnnotationType()

Gets type of annotation.

Returns: AnnotationType

changeAfterResize(Matrix transform)

public void changeAfterResize(Matrix transform)

Update parameters and appearance, according to the matrix transform and moving outside of TrimBox if nesseary.

Parameters:

ParameterTypeDescription
transformMatrixMatrix specifying the transformation.