And... I am done... Got excellent results for hatching...
ONly thing is that i did not use getcliprgn but used pathtoregion function to convert path to region and then used ptinregion to find out the points inside the region... got the starting and ending co-ordinates of each line to be drawing...
I did the following:
beginpath
draw the glyphs
end path
pathtoregion and make a region
And in the rectagle for every pixel check if the pixel is in the region... find the first and last point of every line of hatch...
the draw the hatch.
I have still not finished it, but expect to complete it...
Hi All of you
I could solve this problem using Regions and Path functionality of GDI.
but your tips very valuable in solving this.
Thanks for all your advice.
Any way that you know where I could get the logic for hatching and still get the co-ordinates so that i could drive my pen?
Logically, I feel that I will have to execute the rastering or font filling algorithm that is used by windows to fill fonts. I plan to write some code.. will post it as...
That was indeed a great code. Thanks for that.
However, I was wondering if it would solve my problem. Will I get the co-ordinates of the hatch lines as well as the text drawn by using getpath API Call?
Though Line and Pset is not the best way of drawing on a picturebox, they are at present giving me the flexibility of drawing the TTF Fonts on screen. The Filling i require is mainly for filling of fonts. When using FillStyle, it does not differentiate between the holes that are not to be filled...
Yes, The link I indicated does not do filling of shapes.
I know of this FillStyle method verywell. However, that is not useful as I using only Line and PSet Commands to draw the characters in the Font. And in the same way for drawing various shapes, I am using only Line and Pset Commands.
I am at present successful in reading a TTF File and getting the glyph points for characters and then drawing them on a picturebox using .line method of the picturebox.
I can rotate them, or make them appear circular.. Attached bitmap No.1 will show the output at present. and the attached bitmap...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.