Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Change Annotation Stroke and Fill Colors 6 years 4 months ago #13131

  • alecrugar
  • alecrugar's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 19
  • Thank you received: 0
Hi,
I want to change the color of the annotations (stroke and fill color for the Rect and Ellipse Annotations).
I've modified these values but it has no effect:
public static void default_config()
	{
		selColor = 0x803ADF00;// selection color
		findPrimaryColor = 0x803ADF00;// find primary color
		findSecondaryColor = 0x803ADF00;// find secondary color
		fling_dis = 1.0f;// 0.5-2
        fling_speed = 0.1f;// 0.05 - 0.2
		def_view = 0;// 0,1,2,3,4,5,6 0:vertical 1:horizon 2:curl effect 3:single
						// 4:SingleEx 5:Reflow, 6:show 2 page as 1 page in land
						// scape mode
		render_mode = recommandedRenderMode();// 0,1,2 0:draft 1:normal 2:best with over print support.
		dark_mode = false;// dark mode
		zoomLevel = 5;
        debug_mode = false;
		setAnnotTransparency(annotTransparencyColor);
	}

Thanks

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

Change Annotation Stroke and Fill Colors 6 years 4 months ago #13135

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
you have to change the two last params of AddAnnotRect and AddAnnotEllipse methods in PDFLayoutView class to edit stroke and fill color.
For more info check these :
www.radaeepdf.com/documentation/javadocs...oat:A-float-int-int-
www.radaeepdf.com/documentation/javadocs...oat:A-float-int-int-

Here you will find some info about the Global params : www.radaeepdf.com/support/knowledge-base?view=kb&kbartid=62

In the next release we will add stroke and fill color for each kind of annotation to Global class.
Thanks for your report!

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

Change Annotation Stroke and Fill Colors 6 years 4 months ago #13137

  • alecrugar
  • alecrugar's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 19
  • Thank you received: 0
Hi,
thanks for your response.
I've changed these values, but it does not affect anything, the colours are still the same:
page.AddAnnotRect(rect, vpage.ToPDFSize(3), 0x8040FF00, 0x8040FF00);

:S

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

Change Annotation Stroke and Fill Colors 6 years 4 months ago #13139

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
if you add your annot to the pdf you will see the correct colors, if you want to see the new colors in the draw phase, you have to edit: onDrawRect and onDrawEllipse methods of PDFLayoutView.

Remember that if you want to modify some already created annots you have to use the following methods :

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

Change Annotation Stroke and Fill Colors 6 years 4 months ago #13140

  • alecrugar
  • alecrugar's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 19
  • Thank you received: 0
That was it, thanks a lot!

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

  • Page:
  • 1
Powered by Kunena Forum