beautypg.com

Overview of the mapinfo.styles namespace, Mapinfo.styles namespace – Pitney Bowes MapXtreme User Manual

Page 288

background image

Chapter 15: Stylizing Your Maps

Overview of the MapInfo.Styles Namespace

MapXtreme v7.1

295

Developer Guide

Overview of the MapInfo.Styles Namespace

The MapInfo.Styles namespace highlights the new Styles object model for MapXtreme. The Style
class is the base class of all styles. Classes that derive from Style include AreaStyle, BaseLineStyle,
BaseInterior, BasePointStyle, CompositeStyle, Font, RasterStyle, and TextStyle. Derived from
BaseLineStyle is the SimpleLineStyle class. Derived from BaseInterior is the SimpleInterior class.
Derived from BasePointStyle are the BitmapPointStyle, FontPointStyle, and SimpleVectorPointStyle
classes. Additionally, GridStyle is derived from RasterStyle to include grid specific style settings. A
StockStyles class is provided to create common style types.

You cannot instantiate the abstract style classes Style, BaseLineStyle, BaseInterior or
BasePointStyle. You must create a particular type like SimpleLineStyle, or create them as a
CompositeStyle.

Style is its own object; it is no longer stored in an object. Each table containing a geometry column
also contains a Style column (alias MI_Style) containing a datatype Style. For style overrides, the
Feature class provides FeatureStyleModifier and FeatureOverrideStyleModifiers. The Style object
model also makes available several collection classes (style repositories) to hold styles for the style
dialog controls.

All style classes support the ability to be applied in a sparse manner. See the section on
FeatureOverrideStyleModifiers.

Styles are used in many areas of MapXtreme including the lines, interior fills and point styles that
represent geographic features. Styles are also an integral part of labels, text, layouts, themes,
overrides, legends and selections. Style properties range from standard color fills, line width and
point size, to background effects, bitmaps as point styles, and rotation angle. Practically any style
property you can imagine is available for you to incorporate into your application. Styles can be
changed globally or per feature, overridden for the current display or made as a permanent change.