Methods' Summary |
clear |
Clear the whole canvas area. |
drawPoint |
Draw a point in device resolution on the device.
|
drawLine |
Draw a line in device resolution width (i.e. one device pixel
wide).
|
drawBezier |
Draw a cubic bezier curve in device resolution width (i.e. one
device pixel wide).
|
drawPolyPolygon |
Draw a poly-polygon in device resolution line width (i.e. the
lines are one device pixel wide).
|
strokePolyPolygon |
Stroke each polygon of the provided poly-polygon with the
specified stroke attributes. |
strokeTexturedPolyPolygon |
Stroke each polygon of the provided poly-polygon with the
specified stroke attributes, fill the stroked outline
with the specified texture graphics. |
strokeTextureMappedPolyPolygon |
Stroke each polygon of the provided poly-polygon with the
specified stroke attributes, fill the stroked outline
with the specified texture graphics, map the texture to the
outline via the specified texture mapping. |
queryStrokeShapes |
Query the polygonal representation of the stroke outlines, as
it would be generated by the strokePolyPolygon methods. |
fillPolyPolygon |
Fill the given poly-polygon. |
fillTexturedPolyPolygon |
Fill the given poly-polygon with a texture. |
fillTextureMappedPolyPolygon |
Fill the given poly-polygon with a mapped texture. |
createFont |
Create a suitable font for the specified font description.
|
queryAvailableFonts |
Query font information, specific to this canvas. |
drawText |
Draw the text given by the substring of the specified string
with the given font. |
drawTextLayout |
Draw the formatted text given by the text layout. |
drawBitmap |
Render the given bitmap. |
drawBitmapModulated |
Render the given bitmap, with a global color modulation. |
getDevice |
Request the associated graphic device for this canvas. |
Methods' Details |
clear
- Description
- Clear the whole canvas area.
This method clears the whole canvas area to the device default
color (e.g. white for a printer, transparent for an
XCustomSprite).
|
|
drawPoint
- Description
- Draw a point in device resolution on the device.
- Parameter aPoint
- The point to draw.
- Parameter aViewState
- The viewstate to be used when drawing this point.
- Parameter aRenderState
- The renderstate to be used when drawing this point.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the view and renderstate parameters are outside the
specified range.
|
|
drawLine
- Description
- Draw a line in device resolution width (i.e. one device pixel
wide).
- Parameter aStartPoint
- The start point of the line to draw.
- Parameter aEndPoint
- The end point of the line to draw.
- Parameter aViewState
- The viewstate to be used when drawing this line.
- Parameter aRenderState
- The renderstate to be used when drawing this line.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the view and renderstate parameters are outside the
specified range.
|
|
drawBezier
- Description
- Draw a cubic bezier curve in device resolution width (i.e. one
device pixel wide).
- Parameter aBezierSegment
- The start and the two control points of the bezier curve.
- Parameter aEndPoint
- The end point of the bezier curve.
- Parameter aViewState
- The viewstate to be used when drawing this curve.
- Parameter aRenderState
- The renderstate to be used when drawing this curve.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the view and renderstate parameters are outside the
specified range.
|
|
drawPolyPolygon
- Description
- Draw a poly-polygon in device resolution line width (i.e. the
lines are one device pixel wide).
- Parameter xPolyPolygon
- The poly-polygon to draw.
- Parameter aViewState
- The viewstate to be used when drawing this polygon.
- Parameter aRenderState
- The renderstate to be used when drawing this polygon.
- Returns
- a handle to the cached rendering output.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the view and renderstate parameters are outside the
specified range.
|
|
strokePolyPolygon
- Description
- Stroke each polygon of the provided poly-polygon with the
specified stroke attributes.
This method considers the stroking of all polygons as an
atomic operation in relation to the RenderState's
::CompositeOperationy operation. That means,
overlapping strokes from distinct polygons will look exactly
as overlapping segments of the same polygon, even with
transparency.
- Parameter xPolyPolygon
- The poly-polygon to render.
- Parameter aViewState
- The viewstate to be used when stroking this polygon.
- Parameter aRenderState
- The renderstate to be used when stroking this polygon.
- Parameter aStrokeAttributes
- Further attributes used to parameterize the stroking.
- Returns
- a handle to the cached rendering output.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the view and renderstate parameters are outside the
specified range.
|
|
strokeTexturedPolyPolygon
- Description
- Stroke each polygon of the provided poly-polygon with the
specified stroke attributes, fill the stroked outline
with the specified texture graphics.
This method considers the stroking of all polygons as an
atomic operation in relation to the RenderState's
::CompositeOp operation. That means, overlapping
strokes from distinct polygons will look exactly as
overlapping segments of the same polygon, even with
transparency.
- Parameter xPolyPolygon
- The poly-polygon to render.
- Parameter aViewState
- The viewstate to be used when strokes this polygon.
- Parameter aRenderState
- The renderstate to be used when stroking this polygon.
- Parameter aTextures
- A sequence of texture definitions, with which to fill the
stroked area.
- Parameter aStrokeAttributes
- Further attributes used to parameterize the stroking.
- Returns
- a handle to the cached rendering output.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the view and renderstate parameters are outside the
specified range.
- Throws
- VolatileContentDestroyedException
if a texture bitmap was volatile, and the content was
destroyed before the rendering could take place.
|
|
strokeTextureMappedPolyPolygon
- Description
- Stroke each polygon of the provided poly-polygon with the
specified stroke attributes, fill the stroked outline
with the specified texture graphics, map the texture to the
outline via the specified texture mapping.
This method considers the stroking of all polygons as an
atomic operation in relation to the RenderState's
::CompositeOp operation. That means, overlapping
strokes from distinct polygons will look exactly as
overlapping segments of the same polygon, even with
transparency.
- Parameter xPolyPolygon
- The poly-polygon to render.
- Parameter aViewState
- The viewstate to be used when stroking this polygon.
- Parameter aRenderState
- The renderstate to be used when stroking this polygon.
- Parameter aTextures
- A sequence of texture definitions, with which to fill the
stroked area.
- Parameter xMapping
- A bilinear mapping function which defines the warping of the
textures on the output area.
- Parameter aStrokeAttributes
- Further attributes used to parameterize the stroking.
- Returns
- a handle to the cached rendering output.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the view and renderstate parameters are outside the
specified range.
- Throws
- VolatileContentDestroyedException
if a texture bitmap was volatile, and the content was
destroyed before the rendering could take place.
|
|
queryStrokeShapes
- Description
- Query the polygonal representation of the stroke outlines, as
it would be generated by the strokePolyPolygon methods.
This method can be used to e.g. set a clipping which covers the same
area as a stroke.
- Parameter xPolyPolygon
- The poly-polygon to render.
- Parameter aViewState
- The viewstate to be used when generating the outline.
- Parameter aRenderState
- The renderstate to be used when generating the outline.
- Parameter aStrokeAttributes
- Further attributes used to parameterize the stroking.
- Returns
- a poly-polygon describing the outline of the stroked
area.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the view and renderstate parameters are outside the
specified range.
|
|
fillPolyPolygon
- Description
- Fill the given poly-polygon.
This method fills the given poly-polygon according to the
RenderState's color and the poly-polygon's fill
rule.
- Parameter xPolyPolygon
- The poly-polygon to render.
- Parameter aViewState
- The viewstate to be used when filling this polygon.
- Parameter aRenderState
- The renderstate to be used when filling this polygon.
- Returns
- a handle to the cached rendering output.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the view and renderstate parameters are outside the
specified range.
|
|
fillTexturedPolyPolygon
- Description
- Fill the given poly-polygon with a texture.
This method fills the given poly-polygon according to the
RenderState's color, the given textures and
poly-polygon's fill rule.
- Parameter xPolyPolygon
- The poly-polygon to render.
- Parameter aViewState
- The viewstate to be used when filling this polygon.
- Parameter aRenderState
- The renderstate to be used when filling this polygon.
- Parameter aTextures
- A sequence of texture definitions, with which to fill the
polygonal area.
- Returns
- a handle to the cached rendering output.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the view and renderstate parameters are outside the
specified range.
- Throws
- VolatileContentDestroyedException
if a texture bitmap was volatile, and the content was
destroyed before the rendering could take place.
|
|
fillTextureMappedPolyPolygon
- Description
- Fill the given poly-polygon with a mapped texture.
This method fills the given poly-polygon according to the
RenderState's color, the given textures and
poly-polygon's fill rule. The texture is mapped to the
poly-polygon's interior via the given texture mapping.
- Parameter xPolyPolygon
- The poly-polygon to render.
- Parameter aViewState
- The viewstate to be used when filling this polygon.
- Parameter aRenderState
- The renderstate to be used when filling this polygon.
- Parameter aTextures
- A sequence of texture definitions, with which to fill the
polygonal area.
- Parameter xMapping
- A bilinear mapping function which defines the warping of the
textures on the output area.
- Returns
- a handle to the cached rendering output.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the view and renderstate parameters are outside the
specified range.
- Throws
- VolatileContentDestroyedException
if a texture bitmap was volatile, and the content was
destroyed before the rendering could take place.
|
|
createFont
- Description
- Create a suitable font for the specified font description.
- Parameter aFontRequest
- Parameter aExtraFontProperties
- Additional font properties to be applied when selecting this
font. Normally, you should not need this parameter. Currently,
the following properties are recognized:
Kerning: a ::double between 0 and 1, where
0 completely disables kerning. Whether kerning is on or
off by default is font-dependent.
IsEmphasisMarks: a ::boolean, where true
enables automatic placements of emphasis marks, e.g. for
Hebrew. The default value, if this property is not
specified, is false.
ExpandedSpacing: a ::double value which is added
between all cell distances for this font. The default value for
this property is zero. Use negative values for condensed output,
and positive values for expanded output.
OptionalLayoutFeatures: a sequence of ::PropertyValue listing
font-specific optional layout features, like glyph
variants.
- Parameter aFontMatrix
- Font-specific transformation matrix, which affects both the
glyphs as well as the advancement.
- Returns
- the requested font, or an invalid reference, if the
request failed.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the parameters is not within the allowed range.
|
|
queryAvailableFonts
- Description
- Query font information, specific to this canvas.
- Parameter aFilter
- Filter parameter to reduce the list of returned fonts. Every
member of FontInfo that is not the empty string
or the "don't care" value restricts the list of returned fonts
to contain only those that have the specified attribute.
- Parameter xFontProperties
- This interface can provide additional font properties to
filter the list of available fonts against.
- Returns
- the list of fonts matching the filter set.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the font properties are invalid or not recognized,
or if one of the FontInfo members is not within
the permitted range.
|
|
drawText
- Description
- Draw the text given by the substring of the specified string
with the given font.
The local origin of this output operation is either the left
end of the text baseline, for textDirection equal
LEFT_TO_RIGHT, or the right end of the baseline, for
textDirection equal to RIGHT_TO_LEFT, respectively.
- Parameter aText
- The text to output.
- Parameter xFont
- The font retrieved from this canvas to be used when drawing
the text.
- Parameter aViewState
- The viewstate to be used when drawing this text.
- Parameter aRenderState
- The renderstate to be used when drawing this text.
- Parameter nTextDirection
- A value from the TextDirection collection,
denoting the main writing direction for this string. The main
writing direction determines the origin of the text output,
i.e. the left edge for left-to-right and the right edge for
right-to-left text.
- Returns
- a handle to the cached rendering output.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the view and renderstate parameters are outside the
specified range.
|
|
drawTextLayout
- Description
- Draw the formatted text given by the text layout.
The glyphs as represented by the text layout are always output
with the reference position being the leftmost edge of the
layout object's baseline. If the layout contains more than one
baseline, the baseline of the first strong character in
logical order is used here (strong in this context means that
the character can be unambiguously assigned to a unicode
script).
- Parameter xLayoutetText
- An interface to the readily layouted text, obtained from a
XCanvasFont created at this canvas. The text
layout already carries intrinsic font information.
- Parameter aViewState
- The viewstate to be used when drawing this text.
- Parameter aRenderState
- The renderstate to be used when drawing this text.
- Returns
- a handle to the cached rendering output.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the view and renderstate parameters are outside the
specified range.
|
|
drawBitmap
- Description
- Render the given bitmap.
This method renders the bitmap, at a position and shape as
specified by the combined view and render transformations. For
fast render speed, the bitmap should be created by the
corresponding XGraphicDevice's
XGraphicDevice::createCompatibleBitmap()
method.
- Parameter xBitmap
- The bitmap to render.
- Parameter aViewState
- The viewstate to be used when drawing this text.
- Parameter aRenderState
- The renderstate to be used when drawing this text.
- Returns
- a handle to the cached rendering output.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the view and renderstate parameters are outside the
specified range.
- Throws
- VolatileContentDestroyedException
if a texture bitmap was volatile, and the content was
destroyed before the rendering could take place.
|
|
drawBitmapModulated
- Description
- Render the given bitmap, with a global color modulation.
This method renders the bitmap, at a position and shape as
specified by the combined view and render transformations. For
fast render speed, the bitmap should be created by the
corresponding XGraphicDevice's
XGraphicDevice::createCompatibleBitmap()
method. The bitmap's color channel values are multiplied with
the device color values as specified in the render state.
- Parameter xBitmap
- The bitmap to render.
- Parameter aViewState
- The viewstate to be used when drawing this text.
- Parameter aRenderState
- The renderstate to be used when drawing this text. The device
color entry in the renderstate is multiplied with every pixel
color value, and only the result is rendered into the
canvas. If, for example, the bitmap should be rendered with
increased global transparency, set all device color channels
to 1.0, except for the alpha channel, which should be set to
the desired transparency.
- Returns
- a handle to the cached rendering output.
- Throws
- com::sun::star::lang::IllegalArgumentException
if one of the view and renderstate parameters are outside the
specified range.
- Throws
- VolatileContentDestroyedException
if a texture bitmap was volatile, and the content was
destroyed before the rendering could take place.
|
|
getDevice
- Description
- Request the associated graphic device for this canvas.
A graphic device provides methods specific to the underlying
output device capabilities, which are common for all canvases
rendering to such a device. This includes device resolution,
color space, or bitmap formats.
- Returns
- the associated XGraphicDevice.
|
|
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.