Dither method, Special polygon hole handling, Scale patterns – Pitney Bowes MapXtreme User Manual

Page 523

Advertising
background image

Appendix E: Printing From MapXtreme Applications

Understanding the Print Options in MapXtreme

MapXtreme v7.1

530

Developer Guide

If you set EnableTranslucency to false, SmoothingMode will automatically be set to None if it is not
already. If you set SmoothingMode to AntiAlias, EnableTranslucency will automatically be set to true
if not already. While EnableTranslucency is true, you can switch SmoothingMode between None and
AntiAlias without losing translucency.

MapStyleControl Class

The MapStyleControl (MapInfo.Windows.Controls namespace) can be displayed on a tab in the
desktop LayerControl to allow the user to set map style and rendering options, such as anti-aliasing
and translucency.

Dither Method

Dithering is a technique that blends pixels electronically to maintain the look of an image when
decreasing the color depth. Select a dither method when you are converting a 24-bit image to 256
colors.

Halftone dithering calculates a series of half tone differences in color between high-contrast
elements in your image to create a smooth transition of color. This option is selected by default
for display, print, and export options.

Error diffusion dithering calculates an interim color between contrasting colors and shades the
surrounding pixels to blend evenly toward that interim color.

Set this value by using the DrawingAttributes.RasterDitherMethod property. You can set
this to a value from the DitherMethod enumeration.

Example:

mapPrintDocument.DrawingAttributes.RasterDitherMethod =
MapInfo.Mapping.DitherMethod.HalfTone;

Special Polygon Hole Handling

MapXtreme applications can draw complicated Polygon objects by using several separate pieces
and then merging them together. When a polygon is printed with holes or islands, the pieces may not
match well, and can overlap or leave gaps. There is some internal programming that accommodates
this errant behavior to make sure that the polygons are displayed correctly and print properly. To
take advantage of this functionality set the value of
DrawingAttributes.SpecialPolygonHoleHandling property to true. When drawing to the
screen, this value should be set to false.

Scale Patterns

This setting either prints non-transparent bitmap fill patterns that look like what you see on your
screen or allows the printer driver to have exclusive control over rendering the fill patterns. Set this
value with DrawingAttributes.ScaleBitmapPatterns. If this value is true, the bitmap fill
patterns are scaled up to compensate for the difference in printer and screen resolutions. False
does not scale the pattern and relies on the printer driver for scaling the fill pattern. If the printer
driver can scale fill patterns, you should set this value to false. If the printer driver cannot scale fill

Advertising