RadaeePDF.com :: Topic: Change Annotation Stroke and Fill Colors (1/1)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF

TOPIC: Change Annotation Stroke and Fill Colors

Change Annotation Stroke and Fill Colors 3 weeks 4 days ago #13131

  • alecrugar
  • alecrugar's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Karma: 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
The administrator has disabled public write access.

Change Annotation Stroke and Fill Colors 3 weeks 1 day ago #13135

  • Davide
  • Davide's Avatar
  • OFFLINE
  • Moderator
  • Posts: 717
  • Thank you received: 56
  • Karma: 16
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!
The administrator has disabled public write access.

Change Annotation Stroke and Fill Colors 3 weeks 1 day ago #13137

  • alecrugar
  • alecrugar's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Karma: 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
The administrator has disabled public write access.

Change Annotation Stroke and Fill Colors 3 weeks 1 day ago #13139

  • Davide
  • Davide's Avatar
  • OFFLINE
  • Moderator
  • Posts: 717
  • Thank you received: 56
  • Karma: 16
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 :
The administrator has disabled public write access.

Change Annotation Stroke and Fill Colors 3 weeks 1 day ago #13140

  • alecrugar
  • alecrugar's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Karma: 0
That was it, thanks a lot!
The administrator has disabled public write access.
Powered by Kunena Forum