Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
302
Rectangle pen width vs borders pen width
posted

We are using Infragistics.Documents for printing a customer contract. We want to build up the layout of the contract from a datasource. One of the items that will be defined in our datasource are rectangles and lines.
My idea was to add those rectangles like this:

        Dim rectangle As Shapes.IRectangle
rectangle = site.Shapes.AddRectangle()
With rectangle
.Pen = Pens.Black
.Width = 200
.Height = 100
.X = 10
.Y = 10
End With

The pen has a default width of 1. The constructor of a Pen doesn't accept a width smaller than 1. However when we add a Group or any other container that has a Borders property, the border of the group is thinner than the border of the rectangle:

        Dim group As IGroup
group = site.AddGroup(10, 10)
With group
.Width = New FixedWidth(200)
.Height = New FixedHeight(100)
.Borders.All = New Border(Pens.Black)
End With

Is there any possibility to draw the border of a rectangle with the same width of a border?

Thanks in advance
Kevin

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Kevin,

    It looks like the borders are drawn using a pen that is less than 1 in width.

    prosofttech said:
    The constructor of a Pen doesn't accept a width smaller than 1.

    I tried this out, and it seems to work fine for me:

    .Pen = New Pen(Infragistics.Documents.Graphics.Colors.Black, 0.5F)

     

     

Children
No Data