Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

When drawing a border (using a pen object) around a region within a controls bounds something odd happens. Let say you use a size of 5 for the thickness of the pen and the region is a rectangle. The top and left lines of the border seem to be thicker than the bottom and right lines. Even more mysterious is it seems to go away with certain pen sizes (10). Why is this? I encountered this when creating my own shape control and I have downloaded several others and they seem to have the same problem.

 

Phylum

  • *Experts*
Posted

Are you perhaps filling the region with a brush after drawing the

border? Because the pen's width straddles the actual border of

the Region, it's possible that the fill is overlapping the pen. If

so, just do the filling before drawing the border.

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Posted
The control size is let say 50X50 i reduce the region (rectangle) to 45X45 and then draw a border with thickness of 3. The same problem occurs.
  • *Experts*
Posted

Are you sure you're doing the things in the correct order?

Make sure that you first draw fill, then resize the rectangle, and

finally draw the border, in that order.

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...