Technical Brief: FCW-01
WIDE LINES and THICK LINES in FastCAD 32
by Michael Riddle
July 30, 1997
FastCAD versions 5.07 through 5.09 introduced extensive new features
dealing with line widths. These features are designed to solve a host
of differing user needs, and as such need some explanation of how
they may be used and what tradeoffs are involved.
Paper Scaling & Geometric Scaling
Paper scaling refers to those features defined as being a certain
size on a printed piece of paper or the display screen, regardless
of scaling or zoom factor.
Geometric scaling refers to those features that change their apparent
size on paper or the screen with different zoom factors or print
GDI vs. Non-GDI Features
The Windows Graphics Device Interface (GDI) is an an extensive set
of procedures that perform drawing functions. These procedures, like any
such, have certain limitations. When FastCAD uses a GDI procedure
to perform a needed action, we say it is performed with GDI-based
functions. Some FastCAD functions need to extend the capability
or performance and are performed by FastCAD routines that result
in the final use of multiple lower-level GDI functions. An example
is the drawing of an arc on screen - FastCAD can turn it into a set
of connected lines approximating the arc and draw them much faster
than the GDI arc command.
A thick line in FastCAD is a paper-scale line that is always
solid-filled. Think of it as drawing with either a razor pen, or
one with a blunt tip. No matter the drawing scale, the line
produced by that pen has only one thickness. Thick lines are
implemented as pen-widths in the GDI function CreatePen.
A wide line is a line that is usually geometrically scaled, but
can be switched to paper scaled. It may be filled with any of
the FastCAD fill styles. It is implemented in FastCAD by our
high-speed fill engine, the same as that used to pattern-fill
polygons, circles, etc. Each drawing entity has an assigned
width property, like color, layer, etc.
Using Wide Lines
The LWIDTH command brings up a Line Width dialog (The same one
presented by clicking on the top startus bar width display).
Entering a numeric value then clicking OK sets the Current
Line Width property. Each new entity created is assigned this
value. A value of 0.0 indicates a normal thin line.
Non-closed entities are drawn as a wide line, with their interior
filled with the fill-style assigned to the entity. Examples are
Lines, Paths, Splines, Arcs, etc.
Filled entities such as polygons, smooth polys, circles, etc.
are no longer considered filled. Instead, they are drawn as
an outline of the geometry with the assigned width filled with
the fill style assigned to the entity.
The LWIDTH dialog provides an option to enable color mapping.
If you define a width to selected colors in this dialog, then
any entity drawn in that color, whose entity width property
is 0.0, will instead be drawn as if it had the width that
is mapped to that color.
The LWIDTH dialog has a check box at the bottom that enables
"pen width through GDI calls". This causes the color mapping
width to be used for a thick line, rather than a wide line.
For this to work, both the color mapping and pend-width boxes
must be checked.
When using thick lines, all lines in that color are drawn as
lines of the desired thickness (in paper scale), while any
assigned width property is used to control the filling of the
interior. This will let you have a filled polygon with a thick
outline, for example, by specifying 0.0 width for the entity,
and the thick line width in the color mapping.
Note that the color mapping and line-width option check boxes
are saved in the system registry and apply to all drawings
on your system, and are NOT saved with each individual drawing.
Filling wide lines (especially if they use a non-solid line style!)
can be a time-consuming process. The LWIDTH dialog lets you
specify that you wish to "ignore line widths for display" which
will draw a lines as thin lines on-screen, but draw them with
proper thickness and width when printing.
If you are using a true pen plotter device, wide lines are
VERY slow, as the pen must scan back and forth to fill an area.
Bitmap and Brush Pattern fills do not work, and any of them
you select will be solid-filled. You CAN use hatch and symbol fill
styles effectively on a pen plotter (this is in fact the motivation
for their existence in FastCAD). Also, hatch and symbol fills
If you have a pen plotter, checking the "ignore line widths for
printing" will cause wide lines to become ordinary unfilled lines.
You may use color mapping and GDI pen widths to get thick lines,
and fast printing speeds.
PRINTERS as if they were PLOTTERS
Many printers offer the option (through their properties dialog)
to send graphics in raster or vector format. Raster format needs
memory for printing in relation to the image size, not its visual
complexity. Vector representation needs memory in relation to the
image complexity, not its overall size.
Vector format printing is often an order of magnitude faster in
transmission of data to the printer, but for very complex drawings,
can cause a printer "memory overrun". If this occurs, you either
add more memory to your printer, use raster transmisssion for that
drawing, or make your drawing less complex.
Some printers may be connected to windows by several different drivers.
HP printers and the CADJET printers, among others, can use the HPGL
vector-based printing language. The HP printers can do intermixed
raster fills and vector drawing.
The WINLINE driver, intended for pen plotters, can be used with these
printers for fast vector-based printing, by checking the color
mapping, disable width to printer, and use GDI pen thickness boxes.
Line thickness through color mapping will work, but all brush and
bitmap fills become solid fills.
In the PRINT command dialog box, you may check "print white as
black" or "print all as black". These options let you change the
color used when printing from that used on-screen. If you draw
with white lines on a black background, most (but not all)
printers will not show these lines - white is assumed to be the
paper color. You would want to print these white lines as black
on the printer.
If however, you use white on top of a filled color, some (but
not all) printers will properly "nock out" that area back to white
for printing. If this is your need, you would not check "print
white as black".
Some printers try to print color as grey-scale at higher resolutions.
If you wish to avoid this to have very solid printing lines,
you might whish to check "print all as black".
Color Changes through Color Mapping
Consider the situation where you are using color mapping for thick
lines, but wish to have all of these mapped lines print as black,
any you also want to print certain features (logos, etc.) in color.
You may use the "Set black" button in the color dialog box
to pick which colors are printed as black. The two color samples
shown are for the display (on the left) and the printer (on the
right). If you are using this feature, do NOT select "print
all black" as it overrides this.
Hopefully, the above will explain why there is such a multitude of
width and thickness options in FastCAD, and in which situations
they might be of some use. Many people will use the width property
for line widths, with all boxes unchecked, and never become
involved with color mapping. This approach is much less complex.
For those customers with high volume printing needs where
printing speed is critical, these options provide viable solutions
worth the added complexity.
©1997 Evolution Computing, Inc.