graphics API questions (brushes, pens)
I've been messing around a bit with bitmapped brushes, and have come
across a curiousity - I can't seem to change the foreground color of a
bitmapped brush. If I select one of the stock brush styles, I can
change its color via brush.color. Also can change the background via
a call to setBkColor() api call. Works great.
However, If I define a bitmapped brush (8x8 monochrome), I can set the
background color OK, but as soon as I specify a foreground color for
the brush the bitmap definition seems to be lost, as the brush paints
a solid color. Is this standard Windows behavior? Seems to me you
should be able to change both the foreground and background colors for
a brush.
Any suggestions?
-- Second question --
I would like to be able to draw lines on a canvas using any
combination of pen styles and line widths. However, changing the
width to any value but 1 (or 0) creates a solid pen. I have seen
packages (Visio, for example) that are able to create heavy dashed
(dotted, etc.) lines - How is this accomplished?
Also, is it possible to define new pen styles? If I wanted to create a
'dash dot dot dot dot dash' line style, how would I go about it?
Any input would be greatly appreciated.
- Steve
---------------------------------------------
Opinions expressed do not necessarily reflect
those of my employer.
Steve Davidson
sdpi...@wolfenet.com
Para/Matrix Solutions, Inc.
Specialists in Application Development
and Training
---------------------------------------------