Maptitude GISDK Help

SamplePoint()

Summary

Creates a sample point object for use in a menu or dialog box.

Syntax

sample_point = SamplePoint(string type, string name, real size_or_index, color clr, array options)

Argument

Contents

type

The type of the point; must be "Color Bitmap", "Mono Bitmap", or "Font Character"

name

The filename for the bitmap or the full name of the font (including style and size)

size_or_index

The bitmap size for the bitmap (if negative, use the actual size of the bitmap) or the index of the character in the font

clr

The color of the sample point; ignored for color bitmaps

Option

Type

Contents

Size

2 reals

The width and height (in points) of a rectangle in which the sample can be displayed

Shield

Array

Index and color pairs of font characters that form a highway shield. The char_index and clr parameters are ignored if this option is used. This option is ignored for bitmaps

Returns

A sample point object.

Notes

Examples

// Define an array of samples...

dim samples[40]

for i = 1 to 40 do

     samples[i] = SamplePoint("Font character", "Caliper Cartographic|24", 36 + i, ColorRGB(0, 0, 0), )

     end

// In some dialog box, use the array in a scrolling list...

popdown menu 12, 2, 24, 8 list: samples variable: idx

// Use a sample bitmap in a dialog box

sample 2, 2, 25, 17 transparent contents: SamplePoint("Color Bitmap",

     "bmp\\camwmaps.bmp", -1, , )

Error Codes

Error Type

Meaning

Error

The type or one of the options is not valid

See Also

Function

Summary

GetSample()

Gets a sample object indicating how features in a layer or selection set display on a map

GetThemeSamples()

Gets sample objects indicating how features in a theme display on a map.

SampleLine()

Creates a sample point object for use in a menu or dialog box

SampleArea()

Creates a sample area object for use in a menu or dialog box

SampleText()

Creates a sample text object for use in a menu or dialog box

SaveSampleToImage()

Saves a sample object to an image file

SetSampleText()

Creates a sample object based on an input sample with the specified text for use in a menu or dialog box

 

 

©2025 Caliper Corporation www.caliper.com