Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about iOS development and PDF

how fill color in rect ?

More
IP: 192.168.0.70 12 years 8 months ago - 12 years 8 months ago #3265 by truculent
Replied by truculent on topic how fill color in rect ?
dear radaee our problem is :
when use : Page_addAnnotRect(page, mat, &rect, g_rect_Width * m_scale, g_rect_color, fill_color);
we fill rect with a color with alpha 1 :|
for example when draw rect with red color it fill with red but with alpha 1 and not transparent :(

you hint me with your Hint :
CGFloat clr[4];
clr[0] = //red, ... range [0,1];
clr[1] = //green, ... range [0,1];
clr[2] = //blue, ... range [0,1];
clr[3] = //alpha, ... range [0,1];
CGContextSetFillColor(m_ctx, clr);
CGContextFillRect(m_ctx, CGRectMake(...));

i change only clr[3] = 0.5;
but not different in my alpha in fill rect !
also when i change it my frame of reader's color change (not rect color change )
Last edit: 12 years 8 months ago by patel_patel_patel.
More
IP: 192.168.0.70 12 years 8 months ago #3266 by radaee
Replied by radaee on topic how fill color in rect ?
OK, the alpha channel must be in stroke color(g_rect_color).
alpha channel in fill_color is 0 if no filling, or 255 if has filling.
More
IP: 192.168.0.70 12 years 8 months ago #3274 by truculent
Replied by truculent on topic how fill color in rect ?
i really cant understand your mean :(
your mean there is no way to fill color with alpha ( for EXM : 0.5 ) ?
i want to draw rect Like your Android SDK [in android SDK when draw rect they fill with e color with custom alpha]
More
IP: 192.168.0.70 12 years 8 months ago #3275 by radaee
Replied by radaee on topic how fill color in rect ?
annotation just has 1 alpha information, both for stroke and fill or other graphics.
parameters has 2 color.
alpha informatioin is in sroke color.
fill color use same alpha value to stroke if fill_color alpha value is not zero.
More
IP: 192.168.0.70 12 years 8 months ago #3277 by truculent
Replied by truculent on topic how fill color in rect ?
can you help me :|

i try all of way but result is

upload7.ir/images/16534463092081659262.png
More
IP: 192.168.0.70 12 years 8 months ago #3278 by radaee
Replied by radaee on topic how fill color in rect ?
just try:

Page_addAnnotRect(page, mat, &rect, g_rect_Width * m_scale, 0x80FF0000, 0xFF0000FF);
Time to create page: 0.376 seconds
Powered by Kunena Forum