This function can be used to create an initial MapView for later user. Note that there is a limit to how many MapView objects you can create, and you can only have up to nine at any one time. Trying to create more than that will cause issues.

 

 

Syntax
FsTextureId fsMapViewCreate(
    FsContext ctx,
    unsigned uSizeX,
    unsigned uSizeY,
    FsRenderImageFlags iRenderImageFlags
    )

 

Members
ParametersDescription
ctxA value of type FsContext provided as an argument of the gauge callback.
uSizeXSets the default width. See fsMapViewSetSize for more information.
uSizeYSets the default height. See fsMapViewSetSize for more information.
iRenderImageFlagsPermits you to use specific render flags to change how the image is rendered. See the Remarks below for details.

 

Return Values

Returns the MapView ID which must be used to identify a MapView if further function calls. If the MapView creation fails, the function will return a value <0.

 

Remarks

When using this function you can set 1 or more render flags for the iRenderImageFlags parameter. These can be bitwise OR’d together to create a bitmask that will be used when rendering, for example:

FS_RENDER_IMAGE_REPEATX | FS_RENDER_IMAGE_FLIPY

The available flags are as follows:

FlagsDescription
FS_RENDER_IMAGE_REPEATXThe image should be repeated along the X axis.
FS_RENDER_IMAGE_REPEATYThe image should be repeated along the Y axis.
FS_RENDER_IMAGE_FLIPYThe image should be flipped along the Y axis.
FS_RENDER_IMAGE_PREMULTIPLIEDThe image should be considered as having pre-multiplied alpha.
FS_RENDER_IMAGE_NEARESTThe image should be rendered using “nearest neighbour” interpolation instead of the default bilinear interpolation (thus giving a more pixelated effect).