Last updated

API / geotoolkit / renderer / SurfaceFactory / SurfaceFactory

Class: SurfaceFactory

renderer.SurfaceFactory.SurfaceFactory

Surface factory

Table of contents

Constructors
Methods

Contents

Constructors

new SurfaceFactory()

new SurfaceFactory()

Methods

getClassName

getClassName(): string

Returns

string


createCanvasSurface

Static createCanvasSurface(width, height, devicePixel?, adjust?, pixelScale?): Surface

Create surface

Parameters

Name Type Description
widthnumberThe width of the surface. Must be greater than zero
heightnumberThe height of the surface. Must be greater than zero
Optional devicePixelbooleanIf set to true, width and height will be used as 'device' pixels.
Optional adjustbooleanIf set to true, (x,y) will be snapped to pixel and adjusted with browser scale
Optional pixelScalenumberpixel scale, equals getPixelScale() by default

Returns

Surface

Static createCanvasSurface(options?): Surface

Parameters

Name Type
Optional optionsOptions

Returns

Surface


getClassName

Static getClassName(): string

Returns

string