[英]How to draw Circle around Image using ItextSharp
byte[] byt = DMC_StudentImage;
Image img = Image.GetInstance(byt);
float width = 100f;
float height = 100f;
PdfContentByte content = writer.DirectContent;
PdfTemplate temp = content.CreateTemplate(width, height);
temp.Ellipse(0, 0, width, height);
temp.Clip();
temp.NewPath();
temp.AddImage(img, width, 0, 0, height, 0, 0);
Image clipped = Image.GetInstance(temp);
I have successfully clip an image with the help of above code as showing bellow in image 1, now i want to add circle around image as showing bellow in image 2.我已经在上面的代码的帮助下成功剪辑了一个图像,如图 1 所示,现在我想在图像周围添加圆圈,如下图 2 所示。
可以做一个带后圈的png图片,把图片添加到文档后放上去。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.