Language:

The Free and Open Productivity Suite
Apache OpenOffice 4.1.4 released

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous


:: com :: sun :: star :: awt ::

interface XGraphics
Description
provides the basic output operation of a device.

Methods' Summary
selectFont creates a new font and sets the font.  
setClipRegion sets the clip region to specified clipping.  
intersectClipRegion builds the intersection with the current region.  
push saves all current settings (Font, TextColor, TextFillColor, LineColor, FillColor, RasterOp, ClipRegion).  
pop restores all previous saved settings.  
clear clears the given rectangle on the device  
copy copies a rectangle of pixels from another device into this one.  
draw draws a part of the specified bitmap to the output device.  
drawPixel sets a single pixel in the output device.  
drawLine draws a line in the output device.  
drawRect draws a rectangle in the output device.  
drawRoundedRect draws a rectangle with rounded corners in the output device.  
drawPolyLine draws multiple lines in the output device at once.  
drawPolygon draws a polygon line in the output device.  
drawPolyPolygon draws multiple polygons in the output device at once.  
drawEllipse draws an ellipse in the output device.  
drawArc draws an arc (part of a circle) in the output device.  
drawPie draws a circular area in the output device.  
drawChord draws a chord of a circular area in the output device.  
drawGradient draws a color dispersion in the output device.  
drawText draws text in the output device.  
drawTextArray draws texts in the output device using an explicit kerning table.  
drawImage draws a ::com::sun::star::graphic::XGraphic in the output device.  
Attributes' Summary
Device the device of this graphics  
TextColor the text color used by text operations.  
TextFillColor the fill color used by text operations.  
LineColor the line color.  
FillColor the fill color.  
RasterOp the raster operation.  
Font the font used by text operations.  
FontMetric the font metric of the current font.  
Methods' Details
selectFont
[oneway] void
selectFont( [in] FontDescriptor  aDescription );

Description
creates a new font and sets the font.
setClipRegion
[oneway] void
setClipRegion( [in] XRegion  Clipping );

Description
sets the clip region to specified clipping.
intersectClipRegion
[oneway] void
intersectClipRegion( [in] XRegion  xClipping );

Description
builds the intersection with the current region.
push
[oneway] void
push();

Description
saves all current settings (Font, TextColor, TextFillColor, LineColor, FillColor, RasterOp, ClipRegion).
pop
[oneway] void
pop();

Description
restores all previous saved settings.
clear
[oneway] void
clear( [in] Rectangle  aRect );

Description
clears the given rectangle on the device
Since
Apache OpenOffice 4.0
copy
[oneway] void
copy( [in] XDevice  xSource,
[in] long  nSourceX,
[in] long  nSourceY,
[in] long  nSourceWidth,
[in] long  nSourceHeight,
[in] long  nDestX,
[in] long  nDestY,
[in] long  nDestWidth,
[in] long  nDestHeight );

Description
copies a rectangle of pixels from another device into this one.
draw
[oneway] void
draw( [in] XDisplayBitmap  xBitmapHandle,
[in] long  SourceX,
[in] long  SourceY,
[in] long  SourceWidth,
[in] long  SourceHeight,
[in] long  DestX,
[in] long  DestY,
[in] long  DestWidth,
[in] long  DestHeight );

Description
draws a part of the specified bitmap to the output device.
drawPixel
[oneway] void
drawPixel( [in] long  X,
[in] long  Y );

Description
sets a single pixel in the output device.
drawLine
[oneway] void
drawLine( [in] long  X1,
[in] long  Y1,
[in] long  X2,
[in] long  Y2 );

Description
draws a line in the output device.
drawRect
[oneway] void
drawRect( [in] long  X,
[in] long  Y,
[in] long  Width,
[in] long  Height );

Description
draws a rectangle in the output device.
drawRoundedRect
[oneway] void
drawRoundedRect( [in] long  X,
[in] long  Y,
[in] long  Width,
[in] long  Height,
[in] long  nHorzRound,
[in] long  nVertRound );

Description
draws a rectangle with rounded corners in the output device.
drawPolyLine
[oneway] void
drawPolyLine( [in] sequence< long >  DataX,
[in] sequence< long >  DataY );

Description
draws multiple lines in the output device at once.
drawPolygon
[oneway] void
drawPolygon( [in] sequence< long >  DataX,
[in] sequence< long >  DataY );

Description
draws a polygon line in the output device.
drawPolyPolygon
[oneway] void
drawPolyPolygon( [in] sequence< sequence< long > >  DataX,
[in] sequence< sequence< long > >  DataY );

Description
draws multiple polygons in the output device at once.
drawEllipse
[oneway] void
drawEllipse( [in] long  X,
[in] long  Y,
[in] long  Width,
[in] long  Height );

Description
draws an ellipse in the output device.
drawArc
[oneway] void
drawArc( [in] long  X,
[in] long  Y,
[in] long  Width,
[in] long  Height,
[in] long  X1,
[in] long  Y1,
[in] long  X2,
[in] long  Y2 );

Description
draws an arc (part of a circle) in the output device.
drawPie
[oneway] void
drawPie( [in] long  X,
[in] long  Y,
[in] long  Width,
[in] long  Height,
[in] long  X1,
[in] long  Y1,
[in] long  X2,
[in] long  Y2 );

Description
draws a circular area in the output device.
drawChord
[oneway] void
drawChord( [in] long  nX,
[in] long  nY,
[in] long  nWidth,
[in] long  nHeight,
[in] long  nX1,
[in] long  nY1,
[in] long  nX2,
[in] long  nY2 );

Description
draws a chord of a circular area in the output device.

A chord is a segment of a circle. You get two chords from a circle if you intersect the circle with a straight line joining two points on the circle.

drawGradient
[oneway] void
drawGradient( [in] long  nX,
[in] long  nY,
[in] long  nWidth,
[in] long  Height,
[in] Gradient  aGradient );

Description
draws a color dispersion in the output device.
drawText
[oneway] void
drawText( [in] long  X,
[in] long  Y,
[in] string  Text );

Description
draws text in the output device.
drawTextArray
[oneway] void
drawTextArray( [in] long  X,
[in] long  Y,
[in] string  Text,
[in] sequence< long >  Longs );

Description
draws texts in the output device using an explicit kerning table.
drawImage
[oneway] void
drawImage( [in] long  nX,
[in] long  nY,
[in] long  nWidth,
[in] long  nHeight,
[in] short  nStyle,
[in] ::com::sun::star::graphic::XGraphic  aGraphic );

Description
draws a ::com::sun::star::graphic::XGraphic in the output device.

Note that some devices may not support this operation.

Since
Apache OpenOffice 4.0
Parameter nX
the X coordinate on the device where the graphic will be drawn
Parameter nY
the Y coordinate on the device where the graphic will be drawn
Parameter nWidth
the width of the region on the device
Parameter nHeight
the height of the region on the device
Parameter nStyle
the style used to draw the image. See ImageDrawMode.
Parameter aGraphic
the ::com::sun::star::graphic::XGraphic to be drawn onto the device
Attributes' Details
Device
[ readonly ] XDevice Device;
Description
the device of this graphics
TextColor
::com::sun::star::util::Color TextColor;
Description
the text color used by text operations.
TextFillColor
::com::sun::star::util::Color TextFillColor;
Description
the fill color used by text operations.
LineColor
::com::sun::star::util::Color LineColor;
Description
the line color.
FillColor
::com::sun::star::util::Color FillColor;
Description
the fill color.
RasterOp
RasterOperation RasterOp;
Description
the raster operation.

If the device does not support raster operations, this attribute is ignored.

Font
XFont Font;
Description
the font used by text operations.
FontMetric
[ readonly ] SimpleFontMetric FontMetric;
Description
the font metric of the current font.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache and the Apache feather logo are trademarks of The Apache Software Foundation. OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.