Change Annotation Stroke and Fill Colors - 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 Android development and PDF
  • Page:
  • 1

TOPIC: Change Annotation Stroke and Fill Colors

Change Annotation Stroke and Fill Colors 3 months 1 week ago #13131

  • alecrugar
  • alecrugar's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 15
  • 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 3 months 5 days ago #13135

  • Davide
  • Davide's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 744
  • Karma: 16
  • Thank you received: 56
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 3 months 5 days ago #13137

  • alecrugar
  • alecrugar's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 15
  • 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 3 months 5 days ago #13139

  • Davide
  • Davide's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 744
  • Karma: 16
  • Thank you received: 56
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 3 months 5 days ago #13140

  • alecrugar
  • alecrugar's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 15
  • 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