Fill patterns, Understanding the index numbering schemes – Pitney Bowes MapXtreme User Manual

Page 534

Advertising
background image

Appendix F: Style Lookups

Fill Patterns

MapXtreme v7.1

541

Developer Guide

Fill Patterns

The following table summarizes the MapXtreme fill patterns (also referred to as interior styles within
the MapXtreme programming API). Each fill pattern has an associated Index Number, which is used
for programmatic access into an InteriorStyleRepository object, and a Pattern Number, which is an
internal descriptive name of the fill pattern.

More specifically:

Fill Pattern
The graphical fill pattern itself.

Index Number
The 0-based index used to retrieve the interior style that represents the fill pattern from the
InteriorStyleRepository.

Pattern Number
The numeric identifier for the fill pattern, which may be used to construct an interior style object. This
is an internal number only and can not be used to access the InteriorStyleRepository
programmatically. However, these pattern numbers are used to indicate fill patterns within
MapXtreme workspace files (.mws).

Understanding the Index Numbering Schemes

As seen in the Fill Patterns table, the fill pattern indexes (listed in the Index Number column) range
from 1 to 172. This 1-based indexing scheme is used throughout other MapInfo products (for
example, MapInfo Professional and MapBasic). However in the MapXtreme API, fill patterns (also
called interior style objects) are acquired through an InteriorStyleRepository object that uses
0-based indexing.

Specifically, an InteriorStyleRepository object allows users to iterate through all of the available
interior style objects via a 0-based indexing scheme that ranges from 0 to 172. So there are actually
173 interior style objects to choose from, however, the interior style objects at indexes 0 and 1 are
identical. The equivalence of the objects at elements 0 and 1 is necessary for the following reasons:

First, we must accommodate the inherent 0-based indexing functionality of the
InteriorStyleRepository class itself. That is, the InteriorStyleRepository class permits only 0-based
index access for retrieving elements from its IList. (IList is a standard .NET interface that the
InteriorStyleRepository class implements.)

Advertising