Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

*SpotDiameter option in GPD file for Unidriver plug-in...

9 views
Skip to first unread message

Quintero

unread,
Apr 17, 2002, 9:32:15 AM4/17/02
to
Hello All,

I am trying to change spot size when printing from a custom unidriver
plug-in. I am using oemdll samples from DDK.

There are two question that I have:

1 - Changing *SpotDiameter values by hand doesn't change the printer
output. I am printing a grid of points, I would expect to see thicker
points (or viceversa) than those generated by *SpotDiameter's default
value (100. It means same size than current pixel resolution)
Here I suppose that, independently of spot diameter, the dot size of the
printer is defined only by its resolution. Correct me if I am wrong please.

2 - If it is true that spot diameter option can effectivelly modify the
size of the physical dot (I can't imagine how) Would it be possible to
modify such option from the plug-in rather than from the GPD file?

Thank you very much for your help,

Jorge.

Ashwin [MS]

unread,
Apr 19, 2002, 7:07:18 PM4/19/02
to
An abstract computer pixel is usually considered to be square (or
rectangular), simply because this make the math a _lot_ easier. However, a
physical printer

device spot is almost ways round (or oval), because this is _much_ less
expensive than square (or rectangular ) dots. (This is also true for video
display monitors, but let's stay focused on printers.)

Geometrically, there are basically two ways a square and a circle can be
considered to be the same size. The circle can be circumscribed within the
square (i.e., circle diameter = width of the square) or the square can be
circumscribed within the circle (i.e., circle diameter = diagonal of the
square). For a given square, the ratio of these two circle is the
square-root of 2 (or 1.414...). (BTW, sometimes two shapes are considered
to be the same size if they have equal areas, but this "2-D equivalence" is
probably not being used here).

Most of the image processing or graphics code I have seen (not device
driver related ;-), the geometry is treated in the sense that circle is
placed such that the center of the circle lies at the origin of the
coordinate or major/minor axes. Also, the screen for example, is
considered as a continuous square pixel grid wherein the actual circular
pixel is rendered or scan-converted with its center coinciding with a
corner of our square pixel grid.

Thus, I would believe that rasterizing a spot with 100% diameter would mean
that the diameter would be equal to the width or length of the square
pixel! This is same as the circle inscribed within the square case. In
fact, if the square is inscribed within the circle, the case is that of
the spot diameter > 100% of the pixel size!!!

As far as actual implementation on NT goes, the spot diameter is a function
of the width of the pixel (or rather the cell where the pixel lies at the
integer coordinate at the center of the cell). A 100% Spot diameter would
thus imply that the diameter = cell width. So you cannot actually increase
the pixel width by increasing the spot diameter. For rendering lines, GDI
uses the Knuth's "diamond" rule, where rendering a one-pixel-wide line can
be thought of as dragging a one-pixel-wide by one-pixel-high diamond along
the true line. Pixel centers lie on the integer coordinates, and so we
light any pixel whose center gets covered by the "drag" region. The width
of the diamond is simply the width of the diagonal = s, which would be the
same as our cell width and not s/sqrt(2), where "s" is the cell width=cell
height. Thus, the spot diameter for printing, would be = s. (100% of cell
width).

- Ashwin

This posting is provided "AS IS" with no warranties, and confers no rights.

0 new messages