interface XGraphics in module com::sun::star::awt::

(Global Index)

Syntax

interface XGraphics : com::sun::star::uno::XInterface ;

Description

provides the basic output operation of a device.

Method Summary

getDevice

getFontMetric returns the font metric of the current font.

setFont sets the font used by text operations.

selectFont creates a new font and sets the font.

setTextColor sets the text color used by text operations.

setTextFillColor sets the fill color used by text operations.

setLineColor sets the line color.

setFillColor sets the fill color.

setRasterOp sets the raster operation.

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.

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.

Method Details



getDevice

Syntax

com::sun::star::awt::XDevice getDevice ();

Returns

the device of this graphics.

getFontMetric

Syntax

com::sun::star::awt::SimpleFontMetric getFontMetric ();

Description

returns the font metric of the current font.


setFont

Syntax

oneway void setFont (
com::sun::star::awt::XFont xNewFont );

Description

sets the font used by text operations.


selectFont

Syntax

oneway void selectFont (
com::sun::star::awt::FontDescriptor aDescription );

Description

creates a new font and sets the font.


setTextColor

Syntax

oneway void setTextColor (
long nColor );

Description

sets the text color used by text operations.


setTextFillColor

Syntax

oneway void setTextFillColor (
long nColor );

Description

sets the fill color used by text operations.


setLineColor

Syntax

oneway void setLineColor (
long nColor );

Description

sets the line color.


setFillColor

Syntax

oneway void setFillColor (
long nColor );

Description

sets the fill color.


setRasterOp

Syntax

oneway void setRasterOp (
com::sun::star::awt::RasterOperation ROP );

Description

sets the raster operation.

If the device does not support raster operations then this call is ignored.


setClipRegion

Syntax

oneway void setClipRegion (
com::sun::star::awt::XRegion Clipping );

Description

sets the clip region to specified clipping.


intersectClipRegion

Syntax

oneway void intersectClipRegion (
com::sun::star::awt::XRegion xClipping );

Description

builds the intersection with the current region.


push

Syntax

oneway void push ();

Description

saves all current settings (Font, TextColor, TextFillColor, LineColor, FillColor, RasterOp, ClipRegion).


pop

Syntax

oneway void pop ();

Description

restores all previous saved settings.


copy

Syntax

oneway void copy (
com::sun::star::awt::XDevice xSource,
long nSourceX,
long nSourceY,
long nSourceWidth,
long nSourceHeight,
long nDestX,
long nDestY,
long nDestWidth,
long nDestHeight );

Description

copies a rectangle of pixels from another device into this one.


draw

Syntax

oneway void draw (
com::sun::star::awt::XDisplayBitmap xBitmapHandle,
long SourceX,
long SourceY,
long SourceWidth,
long SourceHeight,
long DestX,
long DestY,
long DestWidth,
long DestHeight );

Description

draws a part of the specified bitmap to the output device.


drawPixel

Syntax

oneway void drawPixel (
long X,
long Y );

Description

sets a single pixel in the output device.


drawLine

Syntax

oneway void drawLine (
long X1,
long Y1,
long X2,
long Y2 );

Description

draws a line in the output device.


drawRect

Syntax

oneway void drawRect (
long X,
long Y,
long Width,
long Height );

Description

draws a rectangle in the output device.


drawRoundedRect

Syntax

oneway void drawRoundedRect (
long X,
long Y,
long Width,
long Height,
long nHorzRound,
long nVertRound );

Description

draws a rectangle with rounded corners in the output device.


drawPolyLine

Syntax

oneway void drawPolyLine (
sequence< long > DataX,
sequence< long > DataY );

Description

draws multiple lines in the output device at once.


drawPolygon

Syntax

oneway void drawPolygon (
sequence< long > DataX,
sequence< long > DataY );

Description

draws a polygon line in the output device.


drawPolyPolygon

Syntax

oneway void drawPolyPolygon (
sequence< sequence< long > > DataX,
sequence< sequence< long > > DataY );

Description

draws multiple polygons in the output device at once.


drawEllipse

Syntax

oneway void drawEllipse (
long X,
long Y,
long Width,
long Height );

Description

draws an ellipse in the output device.


drawArc

Syntax

oneway void drawArc (
long X,
long Y,
long Width,
long Height,
long X1,
long Y1,
long X2,
long Y2 );

Description

draws an arc (part of a circle) in the output device.


drawPie

Syntax

oneway void drawPie (
long X,
long Y,
long Width,
long Height,
long X1,
long Y1,
long X2,
long Y2 );

Description

draws a circular area in the output device.


drawChord

Syntax

oneway void drawChord (
long nX,
long nY,
long nWidth,
long nHeight,
long nX1,
long nY1,
long nX2,
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

Syntax

oneway void drawGradient (
long nX,
long nY,
long nWidth,
long Height,
com::sun::star::awt::Gradient aGradient );

Description

draws a color dispersion in the output device.


drawText

Syntax

oneway void drawText (
long X,
long Y,
string Text );

Description

draws text in the output device.


drawTextArray

Syntax

oneway void drawTextArray (
long X,
long Y,
string Text,
sequence< long > Longs );

Description

draws texts in the output device using an explicit kerning table.

Top of Page