how fill color in rect ? - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about iOS development and PDF

TOPIC: how fill color in rect ?

how fill color in rect ? 5 years 4 months ago #3067

  • truculent
  • truculent's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 64
  • Thank you received: 0
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 :D without any fill color

Please Log in or Create an account to join the conversation.

Last edit: by patel_patel_patel.

how fill color in rect ? 5 years 4 months ago #3070

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 846
  • Karma: 43
  • Thank you received: 12
for 50% black color:
Page_setAnnotFillColor( ..., 0x80000000 );//black with 50% alpha value.

Please Log in or Create an account to join the conversation.

Last edit: by .

how fill color in rect ? 5 years 4 months ago #3075

  • truculent
  • truculent's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 64
  • Thank you received: 0
it's not work for rect :|

only for highlight work :(

please help us :(

Please Log in or Create an account to join the conversation.

how fill color in rect ? 5 years 4 months ago #3102

  • truculent
  • truculent's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 64
  • Thank you received: 0
anyyy sulotion ?

Please Log in or Create an account to join the conversation.

how fill color in rect ? 5 years 3 months ago #3255

  • truculent
  • truculent's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 64
  • Thank you received: 0
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 ] ?

Please Log in or Create an account to join the conversation.

how fill color in rect ? 5 years 3 months ago #3261

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 846
  • Karma: 43
  • Thank you received: 12
please modify codes in PDFView:
    Page_addAnnotRect(page, mat, &rect, g_rect_Width * m_scale, g_rect_color, 0);
to:
    Page_addAnnotRect(page, mat, &rect, g_rect_Width * m_scale, g_rect_color, fill_color);

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum