java - itextpdf : rectangle modify width -


is possible modify width of existing rectangle ?

i have :

@override public void ongenerictag(pdfwriter writer, document document, rectangle rect, string text){ rectangle rectangle = new rectangle(rect); //something : rectangle.setwidth(400f); } 

you can (and should) not use method called setwidth(). whatever method would ambiguous.

suppose have rectangle lower-left x coordinate equal 36 , upper-right x coordinate equal 559. (i didn't choose these numbers @ random: default margins inside default a4 page when using itext.) when change width of such rectangle: mean extend rectangle left, right, or both? hope example shows having setwidth() method doesn't make sense.

instead, should use setleft() or setright() when change x value of left or right coordinate of rectangle, automatically change width , there can no confusion direction in you're changing width.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -