Some Powerdraw q

Started by
2 comments, last by ra001 21 years, 1 month ago
Hi. I get some questions about PD 1. Can rotate text, drawed with PowerFont. I find flip and mirror, but i need rotate text on some free angle... 2. Can draw freeform pologon on canvas? I can draw rectagle with same functions, I see function Poligon, but this can drav only 4 vertex, but i need draw filled poligon with 8 vertex... 3. I dont understud about GetPixel and GetAlpha routines in TAGFImage. I need checking pixel is transparent or not... i try using both functions but i always get different result. My transparent color is Fuchia ($FF00FF), but i cant compare this color with values from functions, i get something other color...
Advertisement
PowerDraw has no routine to rotate text, but you can program one, by rendering font bitmaps and using RotateEffect method.
You can simulate drawing free-form 8-point polygon by drawing several 4-point polygons. You can also draw any kind of polygon by combining 4-point polygons (if you need 3 points only, just specify same coordinates for two points).
GetPixel, as the name says, reads the whole pixel, including alpha-channel and returns it in 32-bit format AABBGGRR (i.e. $FF7F3F1F will have alpha of 255, 127 of blue, 63 of green and 31 of red). GetAlpha returns alpha-channel of specified pixel only. Since the pixel conversion is made automatically, if your textures aren''t 32-bit, you probably won''t get the exact color of $FF00FF, instead it''ll give you something like $F700F7. That''s because in texture formats lower than 32-bit some bits are lost.
Thanx for answer.

But how i can chek transparent color. On screen i see trnsparent is setting ok, but how i can find is pixel transparent or not? I chek image - transparet color is $FF00FF exatly.
A simplest method would be assigning $FF00FF to the first pixel of the image and then reading it again - will give you the converted value. Another method is to use pdrawFormatConv function twice from 32-bit format to the specified texture format and back.

This topic is closed to new replies.

Advertisement