[API](/solutions/geotoolkit/geotoolkit_js/apis/readme) / [geotoolkit](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit) / [renderer](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.renderer) / [RenderingContext](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.renderer#renderingcontext) / RenderingContext

# Class: RenderingContext

[renderer](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.renderer).[RenderingContext](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.renderer#renderingcontext).RenderingContext

Represents context to traverse nodes during picking and rendering

## Hierarchy

- [`Graphics`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics)
↳ **`RenderingContext`**
↳↳ [`DocumentRenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.documentrenderingcontext.documentrenderingcontext)
↳↳ [`SelectionContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.selection.selectioncontext.selectioncontext)


## Table of contents

Constructors
- [new RenderingContext(deviceUnit, filters)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext.md#new renderingcontext(deviceunit, filters))


Methods
| [addFilter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#addfilter) | [arcTo](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#arcto) | [beginPath](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#beginpath) |
|  --- | --- | --- |
| [beginRendering](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#beginrendering) | [bezierCurveTo](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#beziercurveto) | [closePath](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#closepath) |
| [createRenderingState](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#createrenderingstate) | [createSurface](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#createsurface) | [drawAnnulusArc](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#drawannulusarc) |
| [drawArc](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#drawarc) | [drawEllipse](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#drawellipse) | [drawImage](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#drawimage) |
| [drawLine](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#drawline) | [drawPath](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#drawpath) | [drawPolygon](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#drawpolygon) |
| [drawPolyline](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#drawpolyline) | [drawRectangle](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#drawrectangle) | [drawText](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#drawtext) |
| [endRendering](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#endrendering) | [fillPath](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#fillpath) | [filter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#filter) |
| [getContextAt](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#getcontextat) | [getDevicePathLength](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#getdevicepathlength) | [getDeviceRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#getdevicerect) |
| [getFilters](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#getfilters) | [getGlobalAlpha](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#getglobalalpha) | [getGlobalViewPort](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#getglobalviewport) |
| [getImageSmoothing](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#getimagesmoothing) | [getInverseTransformation](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#getinversetransformation) | [getLineMeasure](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#getlinemeasure) |
| [getModelArea](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#getmodelarea) | [getModelRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#getmodelrect) | [getTransformation](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#gettransformation) |
| [getTransformationAt](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#gettransformationat) | [isPicking](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#ispicking) | [lineTo](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#lineto) |
| [measureLine](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#measureline) | [measureText](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#measuretext) | [moveTo](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#moveto) |
| [pushTransformation](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#pushtransformation) | [removeFilter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#removefilter) | [restore](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#restore) |
| [save](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#save) | [setClip](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#setclip) | [setCurrentNode](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#setcurrentnode) |
| [setDeviceRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#setdevicerect) | [setFillPattern](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#setfillpattern) | [setFillStyle](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#setfillstyle) |
| [setFilters](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#setfilters) | [setGlobalAlpha](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#setglobalalpha) | [setGlobalViewPort](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#setglobalviewport) |
| [setImageSmoothing](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#setimagesmoothing) | [setLineMeasure](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#setlinemeasure) | [setLineStyle](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#setlinestyle) |
| [setModelRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#setmodelrect) | [setTextStyle](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#settextstyle) | [setTransformation](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#settransformation) |
| [stroke](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext#stroke) |


## Contents

Constructors
#### new RenderingContext(deviceUnit, filters)

• `Protected` **new RenderingContext**(`deviceUnit?`, `filters?`)

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `Optional` `deviceUnit` | `string` | [`AbstractUnit`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.abstractunit.abstractunit) | represent the `{string}` name, `{string}` symbol or `{AbstractUnit}` unit to be used as unit for device |
| `Optional` `filters` | ([`IFilter`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.ifilter.ifilter) | [`FilterFunc`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.renderer#renderingcontext#filterfunc))[] | an array of filters |


#### Overrides

Graphics.constructor

Methods
#### addFilter

▸ **addFilter**(`filter`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Add filter to be applied

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `filter` | [`IFilter`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.ifilter.ifilter) | [`FilterFunc`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.renderer#renderingcontext#filterfunc) | filter to add |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

#### arcTo

▸ `Abstract` **arcTo**(`x1`, `y1`, `x2`, `y2`, `radius`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Draws an arc to the target point as part of a path.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x1` | `number` | coordinate of destination |
| `y1` | `number` | coordinate of destination |
| `x2` | `number` | coordinate |
| `y2` | `number` | coordinate |
| `radius` | `number` | radius of arc |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[arcTo](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#arcto)

#### beginPath

▸ `Abstract` **beginPath**(): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Begin path

#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[beginPath](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#beginpath)

#### beginRendering

▸ **beginRendering**(): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Prepare rendering context. The default implementation blocks notifications from nodes and
styles. if you call beginRendering then call the endRendering.

#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### bezierCurveTo

▸ `Abstract` **bezierCurveTo**(`cp1x`, `cp1y`, `cp2x`, `cp2y`, `x`, `y`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Draws a cubic B\u00e9zier curve from the current point to the point (x,
y), with control points (cp1x, cp1y) and (cp2x, cp2y).

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `cp1x` | `number` | the x coordinate of the first control point |
| `cp1y` | `number` | the y coordinate of the first control point |
| `cp2x` | `number` | the x coordinate of the second control point |
| `cp2y` | `number` | the y coordinate of the second control point |
| `x` | `number` | the x coordinate of the end point |
| `y` | `number` | the y coordinate of the end point |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[bezierCurveTo](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#beziercurveto)

#### closePath

▸ `Abstract` **closePath**(): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Do nothing if the context has no subpaths. Otherwise, it marks the last
subpath as closed, create a new subpath whose first point is the same as
the previous subpath's first point, and finally add this new subpath to
the path.

#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[closePath](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#closepath)

#### createRenderingState

▸ `Abstract` **createRenderingState**(): [`RenderingState`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingstate.renderingstate)

Creates rendering state

#### Returns

[`RenderingState`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingstate.renderingstate)

a new instance of the rendering state

#### createSurface

▸ `Abstract` **createSurface**(`width`, `height`, `devicePixel?`): [`Surface`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.surface.surface)

Creates a new surface

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `width` | `number` | width of surface |
| `height` | `number` | height of surface |
| `Optional` `devicePixel` | `boolean` | If set to true, width and height will be used as 'device' pixels. |


#### Returns

[`Surface`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.surface.surface)

a new instance of surface

#### drawAnnulusArc

▸ `Abstract` **drawAnnulusArc**(`x`, `y`, `innerRadius`, `outerRadius`, `startAngle`, `endAngle`, `sweepAngle?`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Draws a portion of an annulus clockwise ranging from startAngle to endAngle.
If endAngle exceeds startAngle by Math.PI * 2 or more than annulus is drawn.
Will fill in between the two arcs if fillStyle exists.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | x-coordinate of the center of the arc. |
| `y` | `number` | y-coordinate of the center of the arc. |
| `innerRadius` | `number` | inner radius of the arc |
| `outerRadius` | `number` | outer radius of the arc |
| `startAngle` | `number` | angle in radians measured from x-axis to the starting point of the arc (clockwise means positive angle; counterclockwise - otherwise). |
| `endAngle` | `number` | Angle in radians measured from x-axis to ending point of the arc. |
| `Optional` `sweepAngle` | `number` | Defines the sweep of the arc |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[drawAnnulusArc](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#drawannulusarc)

#### drawArc

▸ `Abstract` **drawArc**(`x`, `y`, `width`, `height`, `startAngle`, `endAngle`, `sweepAngle?`, `suppressLineToCenter?`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Draws an arc clockwise from startAngle to endAngle.
If endAngle exceeds startAngle by Math.PI * 2 or more than ellipse is drawn.
If fillStyle is not null, will fill the arc area using a direct line
to close the path between start and end of arc.
By default, this function renders a "pie" shape, using given fill and stroke style. In order to draw a real arc,
set suppressLineToCenter=true.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | x-coordinate of the upper-left corner of the rectangle that bounds the ellipse. |
| `y` | `number` | y-coordinate of the upper-left corner of the rectangle that bounds the ellipse. |
| `width` | `number` | width of the rectangle that bounds the ellipse. |
| `height` | `number` | height of the rectangle that bounds the ellipse. |
| `startAngle` | `number` | angle in radians measured clockwise from positive x-axis to the starting point of the arc. |
| `endAngle` | `number` | Angle in radians measured clockwise from positive x-axis to the ending point of the arc. |
| `Optional` `sweepAngle` | `number` | Defines the sweep of the arc in radians. This parameter used if and only if startAngle == endAngle |
| `Optional` `suppressLineToCenter` | `boolean` | Does not draw lines from the edges of arc to center point |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[drawArc](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#drawarc)

#### drawEllipse

▸ `Abstract` **drawEllipse**(`x`, `y`, `width`, `height`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Draw and fill ellipse

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse |
| `y` | `number` | y--coordinate of the upper-left corner of the bounding rectangle that defines the ellipse |
| `width` | `number` | width of the bounding rectangle that defines the ellipse. |
| `height` | `number` | height of the bounding rectangle that defines the ellipse. |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[drawEllipse](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#drawellipse)

#### drawImage

▸ `Abstract` **drawImage**(`image`, `srcX`, `srcY`, `srcW?`, `srcH?`, `dstX?`, `dstY?`, `dstW?`, `dstH?`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Draw an image onto the graphics context

**`Example`**

```ts
// Draw image can be used it the three different ways

// Provide only destination x and y
graphics.drawImage(image, dstX, dstY);
// Provide destination x and y and destination width and height
graphics.drawImage(image, dstX, dstY, dstW, dstW);
// Provide source x, y, width, height and destination x and y and destination width and height
graphics.drawImage(image, srcX, srcY, srcW, srcH, dstX, dstY, dstW, dstW);
```

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `image` | [`Surface`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.surface.surface) | [`IBaseImage`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.platforms.ibaseimage.ibaseimage) | image to be rendered |
| `srcX` | `number` | The x-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context. Use the 7- or 9-argument syntax to use it as a source or the x-axis coordinate in the destination context at which to place the top-left corner of the source image. Use the 3- or 5-argument syntax to apply this argument as destination position. |
| `srcY` | `number` | The y-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context. Use the 7- or 9-argument syntax to use it as a source or the y-axis coordinate in the destination context at which to place the top-left corner of the source image. Use the 3- or 5-argument syntax to apply this argument as destination position. |
| `Optional` `srcW` | `number` | source width if 7- or 9-argument is used or image width for other cases |
| `Optional` `srcH` | `number` | source height if y-argument | image height for other cases |
| `Optional` `dstX` | `number` | destination x position |
| `Optional` `dstY` | `number` | destination y position |
| `Optional` `dstW` | `number` | destination width This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn. |
| `Optional` `dstH` | `number` | destination height. If not specified, the image is not scaled in height when drawn. |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[drawImage](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#drawimage)

#### drawLine

▸ `Abstract` **drawLine**(`x1`, `y1`, `x2`, `y2`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Draw line

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x1` | `number` | x-position of start point |
| `y1` | `number` | y-position of start point |
| `x2` | `number` | x-position of end point |
| `y2` | `number` | y-position of end point |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[drawLine](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#drawline)

#### drawPath

▸ **drawPath**(`path`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Apply geometry on the rendering context. The method stroke must be called to draw path outlines or fillPath to fill the geometry

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `path` | [`GraphicsPath`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphicspath.graphicspath) | path to draw |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[drawPath](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#drawpath)

#### drawPolygon

▸ `Abstract` **drawPolygon**(`x`, `array`, `start?`, `end?`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Draw and fill polygon. If fill style is null
then it draws outline only.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number`[] | array of x coordinates of points |
| `array` | `number`[] | of y coordinates of points |
| `Optional` `start` | `number` | index of the first point in the array |
| `Optional` `end` | `number` | index of the last point in the array |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[drawPolygon](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#drawpolygon)

#### drawPolyline

▸ `Abstract` **drawPolyline**(`x`, `y`, `start?`, `end?`, `multiDirection?`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Draw polyline

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number`[] | array of x coordinates of points |
| `y` | `number`[] | array of y coordinates of points |
| `Optional` `start` | `number` | index of the first point in the array |
| `Optional` `end` | `number` | index of the last point in the array |
| `Optional` `multiDirection` | `boolean` | false for one direction array |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[drawPolyline](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#drawpolyline)

#### drawRectangle

▸ `Abstract` **drawRectangle**(`x`, `y?`, `width?`, `height?`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Draw and fill rectangle with the current style. If fill style is null
then it draws outline only.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | X coordinate of the start point |
| `Optional` `y` | `number` | Y coordinate of the start point |
| `Optional` `width` | `number` | Width of rectangle |
| `Optional` `height` | `number` | Height of rectangle |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[drawRectangle](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#drawrectangle)

#### drawText

▸ `Abstract` **drawText**(`x`, `y`, `text`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Draw text

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | x anchor position |
| `y` | `number` | y anchor position |
| `text` | `string` | text to draw |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[drawText](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#drawtext)

#### endRendering

▸ **endRendering**(): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

End usage ot the rendering context

#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### fillPath

▸ `Abstract` **fillPath**(): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Fill all the subpaths of the current path, using fillStyle, and using the
non-zero winding number rule. Open subpaths will be implicitly closed
when being filled (without affecting the actual subpaths).

#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[fillPath](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#fillpath)

#### filter

▸ **filter**(`node`): `boolean`

Filter node

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `node` | [`Node`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.scene.node.node) | node to be rendered |


#### Returns

`boolean`

#### getContextAt

▸ **getContextAt**(`point`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Gets context with non-deviated transformation at the specified location.
The base implementation returns itself.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `point` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | point to get non-deviated context at |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

context with non-deviated transformation

#### getDevicePathLength

▸ **getDevicePathLength**(`pt1`, `pt2`): `number`

Gets path length in device space. <br>
The default implementation returns straight distance between transformed points

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `pt1` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | first model point |
| `pt2` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | second model point |


#### Returns

`number`

#### getDeviceRect

▸ `Abstract` **getDeviceRect**(): [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

Gets rectangular area (defined in device space) to invalidate

#### Returns

[`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

#### getFilters

▸ `Protected` **getFilters**(): ([`IFilter`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.ifilter.ifilter) | [`FilterFunc`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.renderer#renderingcontext#filterfunc))[]

Gets an array of filters

#### Returns

([`IFilter`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.ifilter.ifilter) | [`FilterFunc`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.renderer#renderingcontext#filterfunc))[]

#### getGlobalAlpha

▸ **getGlobalAlpha**(): `number`

Gets the alpha (transparency) value that is applied to shapes and images before they are drawn

#### Returns

`number`

#### getGlobalViewPort

▸ **getGlobalViewPort**(): [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

Gets "global" view port (defined in device space).
The implementation calls for "this.getDeviceRect()"

#### Returns

[`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

#### getImageSmoothing

▸ **getImageSmoothing**(): `boolean`

Return images smoothing enabled flag if context is supported. By default it returns false

#### Returns

`boolean`

enable enable or disable smoothing

#### getInverseTransformation

▸ `Abstract` **getInverseTransformation**(): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Gets the current transformation, which defines transformation from device
coordinates to model coordinates.
Note, that inverse transformation can be calculated based on
getTransformation() call (and vice versa).

#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

#### getLineMeasure

▸ **getLineMeasure**(): [`LineMetrics`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.linemetrics.linemetrics)

Returns line measure

#### Returns

[`LineMetrics`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.linemetrics.linemetrics)

line measure

#### getModelArea

▸ **getModelArea**(): [`Area`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.area.area)

Returns model area (rect/polygon/etc) of current context.

#### Returns

[`Area`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.area.area)

#### getModelRect

▸ `Abstract` **getModelRect**(): [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

Gets rectangular area (defined in model space) to invalidate.
Note, that having called getTransformation() (or getInverseTransformation())
model rect can be calculated based on device rect (and vice versa).

#### Returns

[`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

#### getTransformation

▸ `Abstract` **getTransformation**(): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Gets the current transformation, which defines transformation from model
coordinates to device coordinates

#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

#### getTransformationAt

▸ **getTransformationAt**(`point`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Gets non-deviated transformation at the specified location.
The base implementation returns "this.getTransformation()".

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `point` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | point to get the transformation |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

the transformation

#### isPicking

▸ `Abstract` **isPicking**(): this is SelectionContext

Return true if context is doing picking now

#### Returns

this is SelectionContext

true if this is picking context

#### lineTo

▸ `Abstract` **lineTo**(`x`, `y`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Draw line from the current position to the specified position

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | x position |
| `y` | `number` | y position |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[lineTo](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#lineto)

#### measureLine

▸ **measureLine**(`lineStyle`, `pixelScale?`): `number`

Returns line dimension at the current context

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `lineStyle` | [`LineStyle`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.attributes.linestyle.linestyle) | the line style |
| `Optional` `pixelScale` | `number` | device pixel scale |


#### Returns

`number`

the line width

#### measureText

▸ `Abstract` **measureText**(`text`, `textStyle?`): [`TextMetrics`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.textmetrics.textmetrics)

Return text metrics

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `text` | `string` | text |
| `Optional` `textStyle` | [`TextStyle`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.attributes.textstyle.textstyle) | the text style |


#### Returns

[`TextMetrics`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.textmetrics.textmetrics)

text metrics

#### moveTo

▸ `Abstract` **moveTo**(`x`, `y`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Move current position to x,y. Create a new subpath with the specified
point as its first (and only) point.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | x position |
| `y` | `number` | y position |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[moveTo](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#moveto)

#### pushTransformation

▸ `Abstract` **pushTransformation**(`tr`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Creates a new context with concatenated transformation

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `tr` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | a transformation to concatenate |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

a new context

#### removeFilter

▸ **removeFilter**(`filter`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Remove an instance of the filter

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `filter` | [`IFilter`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.ifilter.ifilter) | [`FilterFunc`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.renderer#renderingcontext#filterfunc) | filter to remove |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

#### restore

▸ `Abstract` **restore**(): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Restore current state

#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### save

▸ `Abstract` **save**(): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Save the current state

#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### setClip

▸ `Abstract` **setClip**(`geometry`, `operation?`, `isModel?`, `evenOdd?`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Sets clipping

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `geometry` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | [`GraphicsPath`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphicspath.graphicspath) | [`Region`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.region.region) | geometry to clip |
| `Optional` `operation` | [`GeometryOperation`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#geometryoperation) | operation to be applied for a new clipping |
| `Optional` `isModel` | `boolean` | model coordinates flag |
| `Optional` `evenOdd` | `boolean` | Defines if clipping to apply is even-odd |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[setClip](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#setclip)

#### setCurrentNode

▸ **setCurrentNode**(`node`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Specify node to be rendered

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `node` | [`Node`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.scene.node.node) | node to be rendered |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### setDeviceRect

▸ `Abstract` **setDeviceRect**(`rect`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Sets device rectangle area of interest

#### Parameters

| Name  | Type  |
|  --- | --- |
| `rect` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### setFillPattern

▸ `Abstract` **setFillPattern**(`pattern`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Set fill pattern

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `pattern` | [`Pattern`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.attributes.pattern.pattern) | pattern to fill the area |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[setFillPattern](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#setfillpattern)

#### setFillStyle

▸ `Abstract` **setFillStyle**(`style`, `area?`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Set fill style

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `style` | [`FillStyle`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.attributes.fillstyle.fillstyle) | fill style |
| `Optional` `area` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | area |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[setFillStyle](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#setfillstyle)

#### setFilters

▸ `Protected` **setFilters**(`filters`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Sets an array of filters

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `filters` | ([`IFilter`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.ifilter.ifilter) | [`FilterFunc`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.renderer#renderingcontext#filterfunc))[] | filters |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

#### setGlobalAlpha

▸ **setGlobalAlpha**(`alpha`, `mode?`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Specifies the alpha (transparency) value that is applied to shapes and images before they are drawn

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `alpha` | `number` | A number between 0.0 (fully transparent) and 1.0 (fully opaque). Not all implementations can support it |
| `Optional` `mode` | [`BlendMode`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#blendmode) | defines mode to blend opacity |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### setGlobalViewPort

▸ **setGlobalViewPort**(`globalViewPort`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Sets "global" view port (defined in device space)
The implementation is empty

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `globalViewPort` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | &quot;global&quot; view port |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

#### setImageSmoothing

▸ **setImageSmoothing**(`enable`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Enable or disable image smoothing if context is supported determines whether scaled images are smoothed.
When enlarging images, the default resizing algorithm will blur the pixels. Set this property to false
to retain the pixels' sharpness. By default is ignored

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `enable` | `boolean` | enable or disable smoothing |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### setLineMeasure

▸ **setLineMeasure**(`lineMeasure`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Set line measure

#### Parameters

| Name  | Type  |
|  --- | --- |
| `lineMeasure` | [`LineMetrics`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.linemetrics.linemetrics) |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### setLineStyle

▸ `Abstract` **setLineStyle**(`style`, `area?`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Set line style

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `style` | [`LineStyle`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.attributes.linestyle.linestyle) | [`GradientStyle`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.attributes.gradientstyle.gradientstyle) | a line style |
| `Optional` `area` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | area to apply fill property of line style |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[setLineStyle](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#setlinestyle)

#### setModelRect

▸ `Abstract` **setModelRect**(`rect`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Sets model rectangle

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `rect` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | model area of interest |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### setTextStyle

▸ `Abstract` **setTextStyle**(`textStyle`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Set text style

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `textStyle` | [`TextStyle`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.attributes.textstyle.textstyle) | style |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[setTextStyle](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#settextstyle)

#### setTransformation

▸ `Abstract` **setTransformation**(`transformation`): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Sets the current transformation, which defines transformation from model
coordinates to device coordinates

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `transformation` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | transformation to be set |


#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### stroke

▸ `Abstract` **stroke**(): [`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

Calculate the strokes of all the subpaths of the current path

#### Returns

[`RenderingContext`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.renderingcontext.renderingcontext)

this

#### Inherited from

[Graphics](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics).[stroke](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphics.graphics#stroke)