简体   繁体   English

PDFsharp DrawRoundedRectangle参数

[英]PDFsharp DrawRoundedRectangle parameters

I would like to use the PDFsharp method 我想使用PDFsharp方法

DrawRoundedRectangle(
    XPen pen,
    double x,
    double y,
    double width,
    double height,
    double ellipseWidth,
    double ellipseHeight
)

for the definition of a clipping path. 用于定义剪切路径。 It works - but I don't get what the last two parameters define exactly. 它有效-但我不明白最后两个参数的确切定义。 Therefore I am not able to sepcify correctly how my rounded corners are constructed. 因此,我无法正确区分圆角的构造方式。

So - What exactly is the method doing with the ellipse (which seems to be defined by width and heigth properties only)? 那么-该方法到底对椭圆做了什么(似乎仅由width和heigth属性定义)?

The straight lines of the rectangle are connected by a quarter of an ellipse in every corner. 矩形的直线在每个角上用四分之一的椭圆连接。 And you specify the size of the ellipse, thus limiting the lengths of the straight lines. 并指定椭圆的大小,从而限制了直线的长度。

Of course, you will get quarters of a circle in the corners if both values for the ellipse are the same. 当然,如果两个椭圆的值都相同,您将获得四角的圆角。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM