Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-11

Printer unit attached

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tony Maro

Well, I got a basic pen and brush property functioning with color and pattern / fill support. A fill pattern contains it's own TPostScriptCanvas that you can draw on (probably using other fills to make more complex objects) and can be attached to the Brush or Pen property of a canvas for use.

I need someone a little more familiar with PostScript to look at the TPSPen.AsString function. I can't get "Uncolored" patterns to work. If you specify that a pattern will not contain it's own colors, and try to use it, postscript spews errors. Colored patterns work just fine. I've compared against some sample code I have but my brain is just fried on this one.

Because of the way postscript works I'm using the same object for both pen and brush right now, but the next step is to make the pen handle movements of the cursor and that will then change.

I separated the postscript code from the hacked TPrinter object code into a unit called "ps.pas"

Thanks,

Tony

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gz00003.gz
Type: application/octet-stream
Size: 15504 bytes
Desc: "printer.tgz"
Url : http://localhost/pipermail/lazarus/attachments/20021112/de0a5f79/gz00003.obj

Reply by email

Unknown author
to Tony Maro
Tony Maro wrote 19 lines
Well, I got a basic pen and brush property functioning with color and pattern / fill support. A fill pattern contains it's own TPostScriptCanvas that you can draw on (probably using other fills to make more complex objects) and can be attached to the Brush or Pen property of a canvas for use. I need someone a little more familiar with PostScript to look at the TPSPen.AsString function. I can't get "Uncolored" patterns to work. If you specify that a pattern will not contain it's own colors, and try to use it, postscript spews errors. Colored patterns work just fine. I've compared against some sample code I have but my brain is just fried on this one. Because of the way postscript works I'm using the same object for both pen and brush right now, but the next step is to make the pen handle movements of the cursor and that will then change. I separated the postscript code from the hacked TPrinter object code into a unit called "ps.pas"

I will have a look at it and see how to fit it in the FCL. I may send some proposals for changes first, though :-)

Michael.

Reply by email