Display raster in true color when possible, Gdi+ translucency and anti-aliasing – Pitney Bowes MapXtreme User Manual

Page 522

Advertising
background image

Appendix E: Printing From MapXtreme Applications

Understanding the Print Options in MapXtreme

MapXtreme v7.1

529

Developer Guide

this to false to let the printing device handle how it prints transparent fill patterns and transparent
bitmap symbols. See

Need for Speed When Using Fill Patterns?

for details about which fill

patterns are bitmaps and which are vectors.

Display Raster in True Color When Possible

Some printers do not support 24-bit (true color) images. MapXtreme has an internal functionality that
accommodates this. Use DrawingAttributes.TrueColorRaster to enable or disable this
functionality.

Set this to true (default) to use the 24-bit (true color) to print raster and grid images. This is
possible when the image is 24-bit and the printer supports more than 256 colors (8 bit). If your
printer does not support 24-bit images, set this attribute as false to render the raster image using
only 256 colors with dither specified in DitherMethod. When printing a 24-bit image with this value
set as false, the resulting printed image will be quite deteriorated. when this attribute is set as
false, you will need to set the dither method as well (see below).

GDI+ Translucency and Anti-Aliasing

GDI+ rendering in MapXtreme allows you to create translucent lines, labels, and layers, as well
apply anti-aliasing that will smooth the jagged edges of lines, curves, and the edges of filled areas
when representing a high-definition rendition at a lower resolution.

When printing a map or a legend using MapPrintDocument or LegendPrintDocument, the
DrawingAttributes.EnableTranslucency and DrawingAttributes.SmoothingMode properties are
automatically set to the values from Map.DrawingAttributes or Legend.DrawingAttributes
respectively. After initialization, the user can override the properties by setting them with their own
value. This allows these two display options to carry over from the map or legend without having to
explicitly set them.

EnableTranslucency: Obtains or sets whether to honor translucent values in style colors and/or
layers when drawing the map onto the screen, printer or file export. When this property is false,
translucency values in styles (e.g., Color.A) and layers (e.g., MapLayer.Alpha) are ignored. A value
of 255 is used instead. This property has no effect on raster translucency (e.g., RasterStyle.Alpha;
however, EnableTranslucency must be enabled to print translucent raster images. This is not
required for screen display or exporting. If you set this property to false, the
DrawingAttributes.SmoothingMode property is automatically set to SmoothingMode.None. In other
words, if translucency not enabled, anti-aliasing cannot be used.

SmoothingMode: Obtains or sets the rendering quality of the map. This property specifies a
member of the MapInfo.Mapping.SmoothingMode enumeration. The default value is
SmoothingMode.None. The smoothing mode specifies whether lines, curves, and the edges of filled
areas use smoothing (also called anti-aliasing). If you set this property to SmoothingMode.AntiAlias,
the MapInfo.Mapping.DrawingAttributes.EnableTranslucency property is automatically set to true. In
other words, translucency is always honored when anti-aliasing is used.

Advertising