- Posts: 64
- Thank you received: 0
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 ?
IP: 192.168.0.70
12 years 10 months ago - 12 years 10 months ago #3067
by truculent
how fill color in rect ? was created by truculent
hi in iOS SDK when draw a rectangle its without with any color 
how i can draw rectangle with color ?
i know i can use Page_setAnnotFillColor();
but it fill with alpha =1
where i can change alpha ?
iven.comuv.com/up/3992e9a68c5a.png
Update :
i add these Line in end of -(void)draw:(CGContextRef)context
method
CGContextStrokeRect(context, rect1);
CGContextSetFillColorWithColor(context, [[UIColor colorWithRed:0.0/255.0 green:0.0/255.0 blue:255.0/255 alpha:0.3]CGColor]);
CGContextFillRect(context, rect1);
CGContextAddRect(context, rect1);
after plus these code result Like :
neci.freeiz.com/up/3c59e5f8b3e9.png
but after press done button [for apply draw ] ---> -(void)vRectEnd method
all of thing going to back
without any fill color
how i can draw rectangle with color ?
i know i can use Page_setAnnotFillColor();
but it fill with alpha =1
where i can change alpha ?
iven.comuv.com/up/3992e9a68c5a.png
Update :
i add these Line in end of -(void)draw:(CGContextRef)context
method
CGContextStrokeRect(context, rect1);
CGContextSetFillColorWithColor(context, [[UIColor colorWithRed:0.0/255.0 green:0.0/255.0 blue:255.0/255 alpha:0.3]CGColor]);
CGContextFillRect(context, rect1);
CGContextAddRect(context, rect1);
after plus these code result Like :
neci.freeiz.com/up/3c59e5f8b3e9.png
but after press done button [for apply draw ] ---> -(void)vRectEnd method
all of thing going to back
without any fill color
Last edit: 12 years 10 months ago by patel_patel_patel.
IP: 192.168.0.70
12 years 10 months ago - 12 years 10 months ago #3070
by radaee
Replied by radaee on topic how fill color in rect ?
for 50% black color:
Page_setAnnotFillColor( ..., 0x80000000 );//black with 50% alpha value.
Page_setAnnotFillColor( ..., 0x80000000 );//black with 50% alpha value.
Last edit: 12 years 10 months ago by .
IP: 192.168.0.70
12 years 10 months ago #3075
by truculent
Replied by truculent on topic how fill color in rect ?
it's not work for rect 
only for highlight work
please help us

only for highlight work
please help us
IP: 192.168.0.70
12 years 10 months ago #3102
by truculent
Replied by truculent on topic how fill color in rect ?
anyyy sulotion ?
IP: 192.168.0.70
12 years 9 months ago #3255
by truculent
Replied by truculent on topic how fill color in rect ?
thank you but i want to my rect fill with a color with a little change in my code!
how i can implement fill rect color ? [where use this method ] ?
how i can implement fill rect color ? [where use this method ] ?
IP: 192.168.0.70
12 years 9 months ago #3261
by radaee
Replied by radaee on topic how fill color in rect ?
please modify codes in PDFView:
to:
Code:
Page_addAnnotRect(page, mat, &rect, g_rect_Width * m_scale, g_rect_color, 0);
Code:
Page_addAnnotRect(page, mat, &rect, g_rect_Width * m_scale, g_rect_color, fill_color);
Time to create page: 0.539 seconds