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

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

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -