Pen object Width property does not seem to be in pixels

It should be in pixels unless youve changed the scaling transform of the graphics youre drawing to.
 
Yes, I found that it was not the Pen it was how DrawRectangle draws the lines!!!! It is very annoying!!!!!!!

Here is the rectangle I have to use to draw a border:
this.BorderRect=new Rectangle(this.borderWidth/2, this.borderWidth/2, this.Size.Width-this.borderWidth, this.Size.Height-this.borderWidth);

The top and left edges start the line in the middle and move out half and half. The right and bottom edges start on the inside and draw out!!

Why?
 
Back
Top