Re: Rendering Issue

Umesha M S wrote:

I am working on Printer Graphics Rendering Driver. In this Driver I
have hooked to DDI functions (DrVBitBlt, DrvStrokePath and etc). When
Graphics engine calls this function I am saving all the incoming
parameter in to some file. Then I use other user mode application to
read this file and draw the content on to the Window using GDI API.

I have following Question.

    1. Is there any sample similar to this kind of operation?

This is exactly what a metafile is for. You shouldn’t need to write a
driver at all. Just record the drawing in a metafile and play it back
on the other wise.

    1. In DrvStrokePath() and DrvStrokeAndFillPath() we have
      LINEATTRS structure, which says about the line info. Here how to
      identify the line is cosmetic and geometric line?

Did you read the documentation?
http://msdn.microsoft.com/en-us/library/windows/hardware/ff568195.aspx

If the LA_GEOMETRIC flag is set in “fl”, then elWidth is a float with
the width. If not, then elWidth is a long with the width in pixels.

And there is one more parameter MIX, which says lower byte is
foreground operation and next byte is background operation. For
foreground ROP operation I used SetRop2() API. But for background ROP
operation I used SetBKMode(), but SetBkMode() Takes only TRANSPERANT
or OPEQUE . How to MAP the Background ROP2 to SetBkMode().

In a dotted/dashed line, the foreground mix is used to draw the dots,
and the background mix is used to draw the spaces in between. GDI
doesn’t provide a way for applications to specify tricky modes for the
background, so the only two background mixes you should ever see are
R2_NOP (which is transparent) and R2_COPYPEN (which is opaque).


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.