Basically, you are using a correct approach. This is the only (valid) method of giving it a non-rectangular shape.
The only problem is: one line cannot make a valid 2D shape which could be used as a valid control region. You need to create a circular shape, not necessarily
simply-conntected, but it should be a "solid" 2D shape. It means, if could be a close contour with one or more wholes in it, or something else. As an alternative to using a path made of lines, you can start with a simple base shape as rectangle or ellipse, and then add or subtract other shapes to/from it, using AND/OR set-theory operations. Please see:
http://msdn.microsoft.com/en-us/library/system.drawing.region.aspx[
^].
Please see the constructors which allows you to start with a rectangle or a graphic path (as you did, only use a "solid" closed path), and then, see the methods
Exclude
,
Union
and
Xor
; use other methods to transform the region, and so on.
[EDIT]
As to the "line shape", there is no such thing. The closest representation of the idea would be an oblong rectangle with some finite non-zero width representing the "width of a line". It's only the mathematical abstract "line" has zero width, but, say, on-screen representation requires some width.
You can start with the rectangle, but, in general case, you need to tilt it to required angle using appropriate
Transform:
http://msdn.microsoft.com/en-us/library/system.drawing.region.transform.aspx[
^].
For example:
using System.Drawing;
Region region = new Region(new Rectangle(x, y, width, 4));
System.Drawing.Drawing2D.Matrix shiftAndRotation = new System.Drawing.Drawing2D.Matrix();
shiftAndRotation.Rotate(requiredAngle);
shiftAndRotation.Translate(deltaX, deltaY);
region.Transform = shiftAndRotation;
—SA