コード例 #1
0
        /// <summary>
        /// Adds a PdfScriptObject to the page that draws a rounded rectangle given left-upper coordinates and width and height.
        /// </summary>
        public static PdfObjectRef DrawRoundedRectangle(this PdfPageWriter page, double x, double y, double width, double height, double radius, PdfGraphicsOptions options)
        {
            var obj = new PdfScriptObject();

            obj.BeginGraphicsState();
            options.Apply(obj);
            obj.DrawRoundedRectangle(x, y, width, height, radius);
            obj.EndPath(true, true, true);
            obj.EndGraphicsState();
            return(page.WriteObject(obj));
        }