MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLMotifSurface Class Reference
Inheritance diagram for TSLMotifSurface:

Detailed Description

X Windows specific implementation of the abstract TSLDrawingSurface class.

Note: For historical reasons this surface is called TSLMotifSurface. It should really be called TSLX11Surface.

Non-Native Rendering

Non-native rendering is not supported with this drawing surface.

Environmental Variables that Affect Behaviour

There are several environmental variables that can be set that affect the behaviour of the drawing surface. These are listed below:

MAPLINK_DISABLE_XRENDER_RASTER: If set, disables the use of the XRender extension for drawing rasters. Normally the drawing surface will use XRender to draw rasters if the display server supports XRender version 0.6 or later. Setting this environmental variable causes the drawing surface to use a fallback drawing mechanism that does not use this extension, which was also the standard raster drawing mechanism in MapLink 7.5 and earlier. Note that setting this variable also disables support for displaying images with an alpha channel and drawing of rasters on a rotated drawing surface.

MAPLINK_ENABLE_XRENDER_CONTRAST: If set, instructs the drawing surface to use the XRender extension to apply contrast adjustments to rasters (see the TSLPropertyRasterContrast data layer property from TSLPropertyEnum). When using a local X server this is usually slower than the default contrast adjustment implementation, but may be faster when using a remote X server. This variable only has an effect if XRender version 0.11 or later is supported by the X server.

Public Member Functions

 TSLMotifSurface ()
 
 TSLMotifSurface (Display *display, Drawable handle, int flags=0)
 
 TSLMotifSurface (Display *display, Screen *screen, Colormap colormap, Drawable handle, int flags=0, Visual *visual=0)
 
virtual ~TSLMotifSurface ()
 
bool attach (Drawable handle, bool isPixmap, Display *display=0, Screen *screen=0, Colormap colormap=0, Visual *visual=0)
 
virtual TSLDrawingSurfaceclone (bool copyUserData=false)
 
int colourValue (int index)
 
bool drawToDrawable (Drawable drawable, double x1, double y1, double x2, double y2, bool clear, int horizontalSizeMM=0, int verticalSizeMM=0, int horizontalSizePixels=0, int verticalSizePixels=0)
 
bool fillStyleValue (int index, int colour, Pixmap pixmap, TSLSimpleString *section=0)
 
bool fontStyleValue (int index, int colour, Pixmap pixmap, TSLSimpleString *fontName=0, const char *outputString=0, TSLSimpleString *section=0)
 
bool fullDetach ()
 
bool lineStyleValue (int index, int colour, int thickness, Pixmap pixmap, TSLSimpleString *section=0)
 
bool symbolStyleValue (int index, int colour, Pixmap pixmap, uint32_t fontSymbolCharacter=0, TSLRasterSymbolScalable rasterSymbolScalability=TSLRasterSymbolScalableAsSymbolFile, TSLSimpleString *section=NULL, TSLSimpleString *description=NULL, int *originX=NULL, int *originY=NULL)
 
- Public Member Functions inherited from TSLDrawingSurface
bool clearAllRendering ()
 
bool clearDynamicColours ()
 
TSLRasterBuffercreateRasterBuffer (unsigned int width, unsigned int height, TSLRasterBuffer::Format format, TSLRasterBuffer::FilterMode filterMode=TSLRasterBuffer::Linear)
 
bool declutterIsVisible (const char *feature_name, double resolution=0.0, const char *layer_name=0) const
 
bool drawDU (TSLDeviceUnits x1, TSLDeviceUnits y1, TSLDeviceUnits x2, TSLDeviceUnits y2, bool clear, bool updateExtentOnly=false)
 
bool drawUU (double x1, double y1, double x2, double y2, bool clear, bool updateExtentOnly=false)
 
bool DUToLatLong (TSLDeviceUnits x, TSLDeviceUnits y, double *latitude, double *longitude, bool local=false, bool boundCheck=true) const
 
bool DUToMU (TSLDeviceUnits x1, TSLDeviceUnits y1, double *x2, double *y2) const
 
bool DUToTMC (TSLDeviceUnits x1, TSLDeviceUnits y1, TSLTMC *x2, TSLTMC *y2) const
 
bool DUToUU (TSLDeviceUnits x1, TSLDeviceUnits y1, double *x2, double *y2) const
 
TSLEntityfindEntityDU (TSLDeviceUnits x, TSLDeviceUnits y, TSLDeviceUnits aperture, int depth, const char *feature_name=NULL)
 
TSLEntityfindEntityUU (double x, double y, double aperture, int depth, const char *feature_name=NULL)
 
TSLEntityfindSelectedEntityDU (TSLDeviceUnits x, TSLDeviceUnits y, TSLDeviceUnits aperture, int depth=-1, bool ignoreMapDataLayers=false)
 
TSLEntityfindSelectedEntityUU (double x, double y, double aperture, int depth=-1, bool ignoreMapDataLayers=false)
 
bool getColourIndices (int **indices, int *num)
 
TSLDataLayergetCoordinateProvidingLayer ()
 
const TSLDataLayergetCoordinateProvidingLayer () const
 
bool getDeclutterRange (const char *featureName, double *innerLimit, double *outerLimit, const char *dataLayerName=0, const char *detailLayerName=0)
 
bool getDeviceCapabilities (int &horizontalSizeMM, int &verticalSizeMM, int &horizontalSizePixels, int &verticalSizePixels) const
 
bool getDeviceCapabilities (TSLDeviceCapabilities &capabilities) const
 
void getDUExtent (TSLDeviceUnits *x1, TSLDeviceUnits *y1, TSLDeviceUnits *x2, TSLDeviceUnits *y2) const
 
bool getFillStyleIndices (int **indices, int *num)
 
bool getFontStyleIndices (int **indices, int *num)
 
bool getLineStyleIndices (int **indices, int *num)
 
void getMUExtent (double *x1, double *y1, double *x2, double *y2) const
 
bool getSymbolStyleIndices (int **indices, int *num)
 
TSLDrawingSurfaceTiledBufferControlgetTiledBufferController ()
 
void getTMCExtent (TSLEnvelope &extent) const
 
void getUUExtent (double *x1, double *y1, double *x2, double *y2) const
 
bool getViewedLatLongRange (double *latitude, double *longitude, double *range, bool local=false, bool boundCheck=true) const
 
bool latLongToDU (double latitude, double longitude, TSLDeviceUnits *x, TSLDeviceUnits *y, bool local=false) const
 
bool latLongToMU (double latitude, double longitude, double *x, double *y, bool local=false) const
 
bool latLongToTMC (double latitude, double longitude, TSLTMC *x, TSLTMC *y, bool local=false) const
 
bool latLongToUU (double latitude, double longitude, double *x, double *y, bool local=false) const
 
bool MUToDU (double x1, double y1, TSLDeviceUnits *x2, TSLDeviceUnits *y2) const
 
bool MUToLatLong (double x, double y, double *latitude, double *longitude, bool local=false, bool boundCheck=true) const
 
bool MUToTMC (double x1, double y1, TSLTMC *x2, TSLTMC *y2) const
 
bool MUToUU (double x1, double y1, double *x2, double *y2) const
 
bool pan (double x1, double y1, bool auto_redraw=true)
 
bool pan (double x1, double y1, TSLDeviceUnits xDU, TSLDeviceUnits yDU, bool auto_redraw=true)
 
TSLMapQueryquery (const char *layerName, TSLTMC x1, TSLTMC y1, TSLTMC x2, TSLTMC y2, int depth=-1, const char *feature_name=NULL) const
 
TSLMapQueryquery (const char *layerName, TSLTMC x1, TSLTMC y1, TSLTMC x2, TSLTMC y2, TSLSelector *selector) const
 
bool redraw ()
 
bool reset (bool auto_redraw=true)
 
bool resize (double x1, double y1, double x2, double y2, bool auto_redraw=true, bool keep_aspect=false)
 
bool rotate (double angle)
 
double rotation () const
 
bool setDeclutterRange (const char *featureName, double innerLimit, double outerLimit, const char *dataLayerName=0, const char *detailLayerName=0)
 
bool setDeviceCapabilities (const int horizontalSizeMM=0, const int verticalSizeMM=0, const int horizontalSizePixels=0, const int verticalSizePixels=0)
 
bool setDeviceCapabilities (const TSLDeviceCapabilities &capabilities)
 
void setRedrawCallback (TSLDrawingSurfaceDrawCallback *callback)
 
bool setupDynamicColours (const char *filename)
 
bool setViewedLatLongRange (double latitude, double longitude, double range, bool local=false, bool auto_redraw=true, bool keep_aspect=false)
 
void TMCperDU (double &xr, double &yr)
 
double TMCperUU ()
 
bool TMCToDU (TSLTMC x1, TSLTMC y1, TSLDeviceUnits *x2, TSLDeviceUnits *y2) const
 
bool TMCToLatLong (TSLTMC x, TSLTMC y, double *latitude, double *longitude, bool local=false, bool boundCheck=true) const
 
bool TMCToMU (TSLTMC x1, TSLTMC y1, double *x2, double *y2) const
 
bool TMCToUU (TSLTMC x1, TSLTMC y1, double *x2, double *y2) const
 
bool updateEntityExtent (TSLEntity *entity, const char *layerName)
 
void userUnitOrigin (double x_origin, double y_origin)
 
void userUnitOrigin (TSLUUEnum origin_enum)
 
void userUnits (double factor)
 
double userUnits ()
 
bool UUToDU (double x1, double y1, TSLDeviceUnits *x2, TSLDeviceUnits *y2) const
 
bool UUToLatLong (double x, double y, double *latitude, double *longitude, bool local=false, bool boundCheck=true) const
 
bool UUToMU (double x1, double y1, double *x2, double *y2) const
 
bool UUToTMC (double x1, double y1, TSLTMC *x2, TSLTMC *y2) const
 
bool wndResize (TSLDeviceUnits x1, TSLDeviceUnits y1, TSLDeviceUnits x2, TSLDeviceUnits y2, bool auto_redraw=true, TSLResizeActionEnum action=TSLResizeActionNone)
 
bool zoom (double percent, bool zoom_in, bool auto_redraw=true)
 
 TSLDrawingSurface ()
 
virtual ~TSLDrawingSurface ()
 
void clearSymbolList ()
 
void clearFontList ()
 
void clearLineList ()
 
void clearFillList ()
 
bool removeFillStyle (TSLStyleID style)
 
bool removeLineStyle (TSLStyleID style)
 
bool removeSymbolStyle (TSLStyleID style)
 
bool removeFontStyle (TSLStyleID style)
 
TSLStyleID createFontID (const TSLSimpleString &name, TSLFontType meaningOfName, int fontWeight, bool italic=false, bool underline=false, bool antiAliased=false, const unsigned char *memoryBlock=NULL, TSLSize memoryBlockSize=0)
 
TSLStyleID createStandardLineID (const unsigned char *pattern, TSLSize patternLength, int initialOffset, TSLLineScalingType scaleType)
 
TSLStyleID createSymbolLineID (int symbolID, double size=0.0, TSLDimensionUnits sizeUnits=TSLDimensionUnitsUndefined, float rotation=0.0f, double anchorPointX=0.0, double anchorPointY=0.0, TSLDimensionUnits anchorPointUnits=TSLDimensionUnitsUndefined)
 
TSLStyleID createStandardFillID (const unsigned char *pattern=NULL, TSLSize patternSizeInBytes=0, int patternXSize=0, int patternYSize=0)
 
TSLStyleID createSymbolFillID (int symbolID, double size=0.0, TSLDimensionUnits sizeUnits=TSLDimensionUnitsUndefined, float rotation=0.0f, double anchorPointX=0.0, double anchorPointY=0.0, TSLDimensionUnits anchorPointUnits=TSLDimensionUnitsUndefined)
 
TSLStyleID createSVGSymbolID (const TSLSimpleString &name, const unsigned char *memoryBlock=NULL, TSLSize memoryBlockSize=0)
 
TSLStyleID createFontSymbolID (const TSLSimpleString &name, TSLFontType meaningOfName, const unsigned char *memoryBlock=NULL, TSLSize memoryBlockSize=0)
 
TSLStyleID createRasterSymbolID (const TSLSimpleString &name, int xorigin, int yorigin, bool scaleable, const unsigned char *memoryBlock=NULL, TSLSize memoryBlockSize=0)
 
TSLStyleID createSymbolIDFromSymbol (TSLStyleID symbolID, int numberofColourPairs, const int *colourFrom, const int *colourTo)
 
- Public Member Functions inherited from TSLDrawingSurfaceBase
bool addDataLayer (TSLDataLayer *data_layer_interface, const char *data_id)
 
bool addDynamicRenderer (TSLDynamicRenderer *renderer, TSLFeatureID featureID=-1, const char *layerName=0)
 
bool addFeatureRendering (const char *featureName, TSLFeatureID featureID)
 
void attach (TSLDeviceContext handle)
 
void attach (TSLWindowHandle handle)
 
void attach (TSLDrawableHandle handle)
 
bool bringInFrontof (const char *move_data_layer, const char *target_data_layer)
 
bool bringToFront (const char *move_data_layer)
 
bool clearAllDeclutterData (const char *layer_name=0)
 
void clearAllDynamicRenderers ()
 
bool clearBackgroundColour ()
 
bool clearDeclutterData (const char *feature_name, const char *layer_name=0)
 
bool clearDynamicRenderer (TSLFeatureID featureID=-1, const char *layerName=0)
 
bool clearFeatureRendering (const char *featureName, TSLFeatureID featureID)
 
bool clearFrame ()
 
bool copyDeclutterData (const char *src_feature_name, const char *dest_feature_name, const char *src_layer_name=0, const char *dest_layer_name=0)
 
void detach ()
 
void detachAllDynamicRenderers ()
 
bool detachDynamicRenderer (TSLFeatureID featureID=-1, const char *layerName=0)
 
const char * featureClass (TSLFeatureID feature_id)
 
bool forceLayer (const char *data_id, const char *detail_layer_name)
 
bool getBackgroundColour (TSLStyleID *value)
 
bool getColourValue (int colour, unsigned char &r, unsigned char &g, unsigned char &b)
 
TSLDataLayergetDataLayer (const char *data_id)
 
bool getDataLayerInfo (int N, TSLDataLayer **dataLayer, const char **layerName) const
 
bool getDataLayerProps (const char *data_id, TSLPropertyEnum property_id, TSLPropertyValue *old_value)
 
bool getDeclutterStatus (const char *feature_name, TSLDeclutterStatusResultEnum *value, const char *dataLayerName=0, const char *detailLayerName=0)
 
bool getDeclutterStatus (TSLFeatureID feature_id, TSLDeclutterStatusResultEnum *value, const char *dataLayerName, const char *detailLayerName=0)
 
TSLDynamicRenderergetDynamicRenderer (TSLFeatureID featureID=-1, const char *layerName=0)
 
bool getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeInt attribute, int *result) const
 
bool getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeDouble attribute, double *result) const
 
bool getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeBool attribute, bool *result) const
 
bool getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributes *result) const
 
int getNumDataLayers () const
 
bool getOption (TSLOptionEnum option)
 
void id (int id_)
 
int id () const
 
bool idleProcess ()
 
bool loadDeclutter (const char *filename)
 
bool loadRendering (const char *filename)
 
TSLPickResultSetpick (TSLDeviceUnits x, TSLDeviceUnits y, TSLDeviceUnits aperture, int depth, TSLPickSelector *selector=0)
 
TSLPickResultSetpick (const char *data_id, TSLDeviceUnits x, TSLDeviceUnits y, TSLDeviceUnits aperture, int depth=-1, TSLPickSelector *selector=0)
 
bool queryActiveLayer (const char *data_id, char *detail_layer_name, int detail_layer_name_size)
 
bool removeDataLayer (const char *data_id)
 
bool saveDeclutter (const char *filename, TSLMapLinkVersion ver=TSL_CURRENT_MAPLINK_VERSION)
 
bool saveRendering (const char *filename, TSLMapLinkVersion ver=TSL_CURRENT_MAPLINK_VERSION)
 
bool sendToBack (const char *move_data_layer)
 
bool sendToBackOf (const char *move_data_layer, const char *target_data_layer)
 
bool setBackgroundColour (int value)
 
bool setCoordinateProvidingLayer (const char *layer_name)
 
bool setDataLayerProps (const char *data_id, TSLPropertyEnum property_id, TSLPropertyValue new_value)
 
bool setDeclutterStatus (const char *feature_name, TSLDeclutterStatusEnum value, const char *dataLayerName=0, const char *detailLayerName=0)
 
bool setDeclutterStatus (TSLFeatureID feature_id, TSLDeclutterStatusEnum value, const char *dataLayerName=0, const char *detailLayerName=0)
 
bool setDeclutterStatusOnAllFeatures (TSLDeclutterStatusEnum value, const char *dataLayerName=0, const char *detailLayerName=0)
 
bool setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeInt attribute, int value)
 
bool setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeDouble attribute, double value)
 
bool setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeBool attribute, bool value)
 
bool setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributes *value)
 
bool setFrame (int style, int colour, int thickness)
 
virtual void setOption (TSLOptionEnum option, bool value)
 
double TMCperMU ()
 
TSLDrawingSurfaceTypeEnum type () const
 
void userWord (void *ptr) const
 
void * userWord () const
 
bool cloneDynamicRenderersFrom (const TSLDrawingSurfaceBase *otherSurface)
 
void addDuplicateLayers (bool value)
 
virtual ~TSLDrawingSurfaceBase ()
 

Static Public Member Functions

static void lockXft ()
 
static void unlockXft ()
 
- Static Public Member Functions inherited from TSLDrawingSurface
static void cleanup ()
 
static bool copy (TSLDrawingSurface *copyTo, TSLDrawingSurface *copyFrom, bool copyUserData=false)
 
static TSLStyleID getIDOfNearestColour (int r, int g, int b)
 
static bool loadStandardConfig (const char *path=0, bool delayLoadIncludes=false)
 
static bool setupColours (const char *filename)
 
static bool setupFillStyles (const char *filename, bool delayLoadIncludes=false)
 
static bool setupFonts (const char *filename, bool delayLoadIncludes=false)
 
static bool setupLineStyles (const char *filename, bool delayLoadIncludes=false)
 
static bool setupSymbols (const char *filename, bool delayLoadIncludes=false)
 
static void disableAntiAliasFonts ()
 
static void enableAntiAliasFonts ()
 
- Static Public Member Functions inherited from TSLDrawingSurfaceBase
static bool addLoader (TSLFileLoader *loader)
 
static bool addPathList (TSLPathList *path_list)
 
static bool findFile (const char *filename, TSLSimpleString &foundPath)
 
static TSLFileLoadergetLoader ()
 

Additional Inherited Members

- Protected Member Functions inherited from TSLDrawingSurfaceBase
 TSLDrawingSurfaceBase ()
 
- Protected Attributes inherited from TSLDrawingSurfaceBase
void * m_classID
 

Constructor & Destructor Documentation

◆ TSLMotifSurface() [1/3]

TSLMotifSurface::TSLMotifSurface ( )

Create a TSLMotifSurface.

This constructor should only be called when the parameters required by the other constructors are not known.

The attach method should be called at the earliest opportunity as attempting to draw is undefined before attach has been called.

◆ TSLMotifSurface() [2/3]

TSLMotifSurface::TSLMotifSurface ( Display * display,
Drawable handle,
int flags = 0 )

Create a TSLMotifSurface.

Parameters
displayX11 Display pointer
handleID of window to attach TSLMotifSurface.
flagsDefault options for TSLDrawingSurface.
Note
The system default Visual is used. If displaying using two different Visual depths then use the other TSLMotifSurface constructor or there will be problems displaying rasters.

◆ TSLMotifSurface() [3/3]

TSLMotifSurface::TSLMotifSurface ( Display * display,
Screen * screen,
Colormap colormap,
Drawable handle,
int flags = 0,
Visual * visual = 0 )

Create a TSLMotifSurface attached to a pixmap/window.

Create a TSLMotifSurface given the pixmap/window. A colormap is also passed in, which is populated by the colours used in the model.

Parameters
displayX11 Display pointer
screenX11 Screen.
colormapX11 Colormap to use.
handleID of window or pixmap to attach TSLMotifSurface.
flagsDefault options for TSLDrawingSurface.
visualThe Visual used to create the Pixmap/Window. Required when rendering rasters. If a Visual is not passed in then the System default Visual will be used. If the System default Visual is not the same as the Visual used to create the Pixmap/Window problems may occur.

◆ ~TSLMotifSurface()

virtual TSLMotifSurface::~TSLMotifSurface ( )
virtual

Destructor.

Member Function Documentation

◆ attach()

bool TSLMotifSurface::attach ( Drawable handle,
bool isPixmap,
Display * display = 0,
Screen * screen = 0,
Colormap colormap = 0,
Visual * visual = 0 )

Attaches a new Pixmap/Window to the drawing surface.

You should pass as many parameters as possible. Any parameters which are defaulted will use the original parameters passed to the constructor or previous attach or the display defaults.

The TSLDrawingSurface will require update of window size after this call.

Note: setDeviceCapabilities will need to be called if the device capabilities need to be adjusted.

Parameters
handleHandle of the Drawable/Window to attach to the drawing surface.
isPixmapTrue the handle is a Drawable, false if the handle is a Window.
displayX11 Display pointer
screenX11 Screen.
colormapX11 Colormap to use.
visualThe Visual used to create the Pixmap/Window. Required when rendering rasters. If a Visual is not passed in then the System default Visual will be used. If the System default Visual is not the same as the Visual used to create the Pixmap/Window problems may occur.
Note
a drawable in this context is a Drawable which is not a Window.

◆ clone()

virtual TSLDrawingSurface * TSLMotifSurface::clone ( bool copyUserData = false)
virtual

This method clones the drawing surface and creates another drawing surface which reference the same data layers, data layer properties, options and coordinate system configuration.

Parameters
copyUserDataIf true, the userID and userWord will be copied to the new surface.
Returns
new cloned drawing surface, NULL on error.

Implements TSLDrawingSurface.

◆ colourValue()

int TSLMotifSurface::colourValue ( int index)

Query colour value used by TSLDrawingSurface.

This method retrieves the colour definition used by the drawing surface for a given index. On Unix, the returned value is the pixel value assigned in the GC.

The colour value is only valid while the palette has not been changed. Only colours that have been allocated will return a valid value.

Parameters
indexIndex of the colour to retrieve.
Returns
colour value, or -1 if the colour has not been allocated or an error occurred.

◆ drawToDrawable()

bool TSLMotifSurface::drawToDrawable ( Drawable drawable,
double x1,
double y1,
double x2,
double y2,
bool clear,
int horizontalSizeMM = 0,
int verticalSizeMM = 0,
int horizontalSizePixels = 0,
int verticalSizePixels = 0 )

This method allows the TSLMotifSurface to draw to a drawable to which it is not attached.

The drawable must have been created for the same display, visual, screen and colourmap. X11 does not provide a method for checking this.

Note: the device co-ordinate system for the target Drawable may not be the same as the one currently attached to the TSLDrawingSurface. Because of this, it may be necessary to do a temporary wndResize() and resize() on the TSLDrawing Surface.

Parameters
drawableDrawable to draw to (must be setup the same as the Drawing Surface).
(x1,y1)Bottom left co-ordinate (in user units) of the area to draw.
(x2,y2)Top right co-ordinate (in user units) of the area to draw.
clearIf true this will clear the specified area before drawing any of the data.
horizontalSizeMMHorizontal size of the visible screen in mm's. Defaults to system setting.
verticalSizeMMVertical size of the visible screen in mm's. Defaults to system setting.
horizontalSizePixelsHorizontal size of the screen in pixels. Defaults to system setting.
verticalSizePixelsVertical size of the screen in pixels. Defaults to system setting.

See Also: TSLDrawingSurface::setDeviceCapabilities

◆ fillStyleValue()

bool TSLMotifSurface::fillStyleValue ( int index,
int colour,
Pixmap pixmap,
TSLSimpleString * section = 0 )

Query example fill rendering used by TSLDrawingSurface.

This method populates the specified bitmap with a sample of the specified fill. The bitmap is not cleared before filling, thus enabling translucent and stippled patterns to show the underling user rendered pixmap.

The pixmap must have been created using the Visual associated with this Drawing Surface.

Parameters
indexIndex of a fill style.
colourColour to fill with.
pixmappixmap to populate with fill style rendering
sectionIf provided this will be populated with the section heading that this fill style appears under
Returns
a true on success, false otherwise.

◆ fontStyleValue()

bool TSLMotifSurface::fontStyleValue ( int index,
int colour,
Pixmap pixmap,
TSLSimpleString * fontName = 0,
const char * outputString = 0,
TSLSimpleString * section = 0 )

Query example text rendering used by TSLDrawingSurface.

This method populates the specified pixmap with a sample of the specified text style. The pixmap is not cleared before drawing the text. The height of the pixmap is used define the height of the text. The text displayed is either the specified outputString, or the font name if no string is passed.

If required, the name of the font may be returned through the fontName parameter.

The pixmap must have been created using the Visual associated with this Drawing Surface.

Parameters
indexIndex of a font style
colourColour to display the text
pixmapPixmap to populate with text
fontNamePopulated by the base name of the font (optional)
outputStringString to be displayed, otherwise font name is used (optional)
sectionIf provided this will be populated with the section heading that this font style appears under
Returns
a true on success, false otherwise.

◆ fullDetach()

bool TSLMotifSurface::fullDetach ( )

This detach cleans up all X11 resources used by the Drawing Surface.

If you need to attach a new drawable you must call the TSLMotifSurface::attach rather then the TSLDrawingSurface:attach.

◆ lineStyleValue()

bool TSLMotifSurface::lineStyleValue ( int index,
int colour,
int thickness,
Pixmap pixmap,
TSLSimpleString * section = 0 )

Query example line rendering used by TSLDrawingSurface.

This method populates the specified pixmap with a sample of the specified line style. The pixmap is not cleared before rendering.

The pixmap must have been created using the Visual associated with this Drawing Surface.

Parameters
indexIndex of a line style
colourColour to draw line with
thicknessThickness of line style, in pixels
pixmapPixmap to populate with line style rendering
sectionIf provided this will be populated with the section heading that this line style appears under
Returns
a true on success, false otherwise.

◆ lockXft()

static void TSLMotifSurface::lockXft ( )
static

Call this method when you are about to draw text within your application using the Xft extension (XRender).

This method only needs to be called if you are drawing in multiple threads as the Xft library is not thread safe.

◆ symbolStyleValue()

bool TSLMotifSurface::symbolStyleValue ( int index,
int colour,
Pixmap pixmap,
uint32_t fontSymbolCharacter = 0,
TSLRasterSymbolScalable rasterSymbolScalability = TSLRasterSymbolScalableAsSymbolFile,
TSLSimpleString * section = NULL,
TSLSimpleString * description = NULL,
int * originX = NULL,
int * originY = NULL )

Query example symbol rendering used by TSLDrawingSurface.

This method allows the user to populate a pixmap with a symbol, according to an index into the symbol list used by the drawing surface. The aim of this method is to give the user the ability of viewing the symbols used by the drawing surface.

The user creates the pixmap to be populated. The size of the pixmap is typically 32*32 pixels if the symbol is an icon.

The pixmap must have been created using the Visual associated with this Drawing Surface.

Parameters
indexIndex of a symbol style.
colourColour of the symbol.
pixmapPixmap to populate with symbol rendering
fontSymbolCharacterIf the symbol style index refers to a font symbol, this is the character that will be drawn using that font. The value is a Unicode Code Point.
rasterSymbolScalabilityThe symbol style index refers to a raster symbol, this flag will dictate the scalability of the symbol.
sectionIf provided this will be populated with the section heading that this symbol style appears under
descriptionif not null will be populated with the symbols description
originXis the returned x-origin of the symbol in in pixels (originX and originY have to both be passed)
originYis the returned y-origin of the symbol in pixels (originX and originY have to both be passed)
Returns
true on success, false otherwise.

◆ unlockXft()

static void TSLMotifSurface::unlockXft ( )
static

Call this method when you have finished drawing text within your application.