Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF

TOPIC:

how fill color in rect ? 10 years 8 months ago #3295

  • truculent
  • truculent's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 64
  • Thank you received: 0
thank youuuuuuuuu DEaaaaaaaar radaeeeeeeeeee <3 :* : * <3 <3 <3
now is there any way for change the color of fill ?
whene i change another Value [ again alpha back to 1 :( ]

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

how fill color in rect ? 10 years 8 months ago #3304

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
you can get stroke color and set back to annotation with different alpha.
and then set fill color.

it can't change alpha value if set fill color only,

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

how fill color in rect ? 10 years 8 months ago #3306

  • truculent
  • truculent's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 64
  • Thank you received: 0
thank you
but can you give me another sample for anoter color?
why when i change grect color & fill color in addAnoot-xxxxxx()
again my rect with alpha 1
but you last value have correct alpha!
i cand undrestand how youndo it!

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

how fill color in rect ? 10 years 8 months ago #3310

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
for add rect annotation with fill color:
Page_AddAnnotRect( page, mat, rect, strokecolor_and_alpha, fill_color_with_255_alpha );

for add rect annotation without fill color:
Page_AddAnnotRect( page, mat, rect, strokecolor_and_alpha, fill_color_with_0_alpha );

set alpha for rect annotation:
int clr = Page_GetAnnotStrokeColor(page, annot);
clr &= 0xFFFFFF;//clear alpha value;
clr |= (alpha<<24);//set alpha value, alpha value is in range [0,255];
Page_SetAnnotStrokeColor( page, annot, clr );

set all values:
int stroke_clr = Page_GetAnnotStrokeColor(page, annot);
stroke_clr &= 0xFFFFFF;//clear alpha value;
stroke_clr |= (alpha<<24);//set alpha value, alpha value is in range [0,255];
int fill_clr = 0xFF000000 | your_fill_color;
Page_SetAnnotFillColor( page, annot, fill_clr );
Page_SetAnnotStrokeColor( page, annot, stroke_clr );
Page_SetAnnotStrokeWidth( page, annot, stroke_width );

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

Last edit: by .
Powered by Kunena Forum