Hi,

I'm using the sample code from the iText in action to round my image.

Image img1 = Image.getInstance("d:\\7311310034092.jpg");
float w = MeasurementUtil.millimetersToPostscriptPoints(70.8f);
float h = MeasurementUtil.millimetersToPostscriptPoints(90f);
img1.scaleToFit( w, h);
PdfTemplate tp1 = cb.createTemplate(w, h);
img1.setAbsolutePosition(0, 0);
tp1.roundRectangle(0, 0, w, h, 10f);
tp1.clip();
tp1.newPath();
tp1.addImage(img1);
cb.addTemplate(tp1, 300, 300);

I have tried to set the color stroke and linewidth on the PdfTemplate but I
can't get the border to show.
can someone please point me in the right direction.
-- 
View this message in context: 
http://www.nabble.com/Rounding-an-Image-with-border-tp23673724p23673724.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to