All Cadcorp SIS API Methods

RenderExtent Method

Description

Renders the specified view into an image.

Syntax

Visual Basic
Public Function RenderExtent( _
   ByVal xSize As Integer, _
   ByVal ySize As Integer, _
   ByVal strFormat As String, _
   ByVal x1 As Double, _
   ByVal x2 As Double, _
   ByVal y1 As Double, _
   ByVal y2 As Double, _
   ByVal prj As String _
) As String

Parameters

xSize
The x size in pixels to make the image.
 

ySize

The y size in pixels to make the image.

strFormat
The format you want the image to be rendered in. The valid formats are:
image/jpeg JPEG is suitable for photographs, and is understood by almost all browsers.
image/gif GIF is suitable for displaying linework and is preferable to JPEG.
image/png PNG is the preferred format, suitable for displaying a mixture of vector and raster data, and understood by latest versions of most browsers.
image/x-MS-bmp Windows BMP is an image file format understood by almost all browsers.
application/x-msmetafile Windows Meta File is understood by Internet Explorer and other browsers.
application/pdf;PaperFormat=… PDF will normally require a browser plugin. The PaperFormat parameter is mandatory; additional standard PDF formatting parameters can be supplied.

The following list gives the parameter names and values for image formats:

PhotometricInterpretation: (for PNG only, GIF & JPEG are implicitly PaletteColor)
- PaletteColor
- RGB
- RGBA

DitherPalette: (for PaletteColor only)
- ColorCube125
- ColorCube216
- BlackWhite
- GrayScale/GreyScale
- Adaptive
- OctTree
- Custom
- a literal palette, in the form RRGGBBRRGGBBRRGGBBRRGGBB....

DitherAlgorithm: (for PaletteColor only)
- Default
- SystemSnap
- SystemDither
- PaletteSnap
- FloydSteinberg

Transparent: (for PaletteColor and RGB only)
- True
- False

BGColor: (for PaletteColor and RGB only)
- RGB color in format 0xRRGGBB

Quality: (for JPEG only)
- number from 1 to 100

x1
The first x coordinate of the rendered image.

y1
The first y coordinate of the rendered image.
 
x2
The second x coordinate of the rendered image.

y2
The second y coordinate of the rendered image.

prj
The coordinate reference system. If prj is left blank, the current view's coordinate reference system is used.

Remarks

Note: Choose a format that is supported by the target users’ browsers. If they have a more recent browser, consider using PNG. If they have older browsers, choose JPEG. This method is usually put in its own ASP page. The applet or control used to display the map uses the separate page as the image source.

Available: GEO

Groups:

Example

sis.RenderExtent (300, 300, image/gif, 100, 100, 200, 200, "*APrjNatGrid")

Some example format strings with parameters:

image/png;PhotometricInterpretation=RGB
image/png;PhotometricInterpretation=PaletteColor,DitherPalette=OctTree
image/png;PhotometricInterpretation=PaletteColor,DitherPalette=OctTree,DitherAlgorithm=SystemSnap
image/gif;DitherPalette=OctTree,DitherAlgorithm=SystemSnap
image/jpeg;Quality=95
application/pdf;paperformat=A4,... + the usual parameters