TextAPI.overrideDefaultSize

 

long overrideDefaultSize(float size, bool isFixed)

This methods changes the default font size for this TextAPI object to size.  If isFixed is FALSE, size is taken to be millimeters on the map projection.  If isFixed is TRUE, size is taken to be pixels on the view.  Thus, in the former case, the associated text object will appear larger and larger as the view is zoomed in, whereas in the former case the text object will remain the same size (i.e. a fixed number of pixels) as the view is zoomed.

The default size is used whenever a new text feature is created, via any of the following methods:

However, fixed-size labels are meaningful only for those located in relation to a single point.  Thus, the isFixed setting is ignored by all methods except:

where addLabelToFeature also ignores the setting unless the given feature is a point (symbol).  The initial default size is 8 millimeters.

This method returns 0 upon success, and returns an error code if size is less than 1.