Click here to Skip to main content
15,881,173 members
Home / Discussions / C#
   

C#

 
GeneralPrinting Problem Pin
cjengler30-Jan-04 1:13
cjengler30-Jan-04 1:13 
GeneralWell now I'm convinced Pin
Rob Manderson29-Jan-04 22:41
protectorRob Manderson29-Jan-04 22:41 
GeneralRe: Well now I'm convinced Pin
Stephane Rodriguez.29-Jan-04 23:24
Stephane Rodriguez.29-Jan-04 23:24 
GeneralRe: Well now I'm convinced Pin
Brian Delahunty30-Jan-04 3:12
Brian Delahunty30-Jan-04 3:12 
GeneralRe: Well now I'm convinced Pin
Stephane Rodriguez.30-Jan-04 4:49
Stephane Rodriguez.30-Jan-04 4:49 
GeneralRe: Well now I'm convinced Pin
Brian Delahunty30-Jan-04 5:45
Brian Delahunty30-Jan-04 5:45 
GeneralRe: Well now I'm convinced Pin
Stephane Rodriguez.30-Jan-04 6:08
Stephane Rodriguez.30-Jan-04 6:08 
GeneralGDI+ problem (tough!) Pin
r929-Jan-04 22:38
r929-Jan-04 22:38 
I have this drawing:

private System.Drawing.Graphics graphicsObj = null;
private System.Drawing.Pen penBlackWidth1 = new System.Drawing.Pen(System.Drawing.Color.Black,1);
private Point[] curvePoints = null;
private SolidBrush lightGrayBrush = new SolidBrush(Color.LightGray);
private Point point1;
private Point point2;
private Point point3;
private Point point4;
private SolidBrush blackBrush = new SolidBrush(Color.Black);
...................................................

try
{

graphicsObj = e.Graphics;

graphicsObj.DrawLine(penBlackWidth1, 45, 20, 175, 20);
graphicsObj.DrawLine(penBlackWidth1, 45, 20, 45, 120);
graphicsObj.DrawLine(penBlackWidth1, 175, 20, 175, 120);

graphicsObj.DrawLine(penBlackWidth1, 45,120,90,160);
graphicsObj.DrawLine(penBlackWidth1, 175, 120, 135, 160);
graphicsObj.DrawLine(penBlackWidth1, 90, 160, 135, 160);

graphicsObj.DrawLine(penBlackWidth1, 465, 335, 490, 335);
graphicsObj.DrawLine(penBlackWidth1, 580, 335, 605, 335);

graphicsObj.DrawLine(penBlackWidth1, 465, 335, 490, 335);
graphicsObj.DrawLine(penBlackWidth1, 580, 335, 605, 335);

graphicsObj.DrawLine(penBlackWidth1, 473, 345, 483, 345);
graphicsObj.DrawLine(penBlackWidth1, 473, 345, 478, 335);
graphicsObj.DrawLine(penBlackWidth1, 483, 345, 478, 335);

graphicsObj.DrawLine(penBlackWidth1, 587, 345, 597, 345);
graphicsObj.DrawLine(penBlackWidth1, 587, 345, 592, 335);
graphicsObj.DrawLine(penBlackWidth1, 597, 345, 592, 335);

point1 = new Point(592,335);
point2 = new Point(597,345);
point3 = new Point(587,345);
point4 = new Point(592,335);

curvePoints = new Point[]
{
point1,point2, point3, point4
};

graphicsObj.FillPolygon(blackBrush, curvePoints, FillMode.Alternate);

point1 = new Point(478,335);
point2 = new Point(483,345);
point3 = new Point(473,345);
point4 = new Point(478,335);

curvePoints = new Point[]
{
point1,point2, point3, point4
};

graphicsObj.FillPolygon(blackBrush, curvePoints, FillMode.Alternate);
}
catch (Exception ex)
{

MessageBox.Show(ex.Message);
}



I want to fill the drawing with a color.
From buttom to top.
BUT the drawing must be filled accourding to a percent.
Is 50%, then only 50% of the drawing must be filled with the color.

Natural the fill must newer come outside the drawings edge.


Any help?

Thanks
GeneralRe: GDI+ problem (tough!) Pin
r929-Jan-04 22:39
r929-Jan-04 22:39 
GeneralRe: GDI+ problem (tough!) Pin
Shree30-Jan-04 0:44
Shree30-Jan-04 0:44 
GeneralRe: GDI+ problem (tough!) Pin
r930-Jan-04 1:56
r930-Jan-04 1:56 
Questioncontrolling the autoscroll behaviour of panel? Pin
misterbear29-Jan-04 21:49
misterbear29-Jan-04 21:49 
Answerwhat the ascii figure should look like... Pin
misterbear29-Jan-04 21:55
misterbear29-Jan-04 21:55 
GeneralRe: what the ascii figure should look like... Pin
Heath Stewart30-Jan-04 4:31
protectorHeath Stewart30-Jan-04 4:31 
GeneralRe: what the ascii figure should look like... Pin
misterbear31-Jan-04 11:30
misterbear31-Jan-04 11:30 
GeneralRegular Expression Pin
Member 33502229-Jan-04 20:36
Member 33502229-Jan-04 20:36 
GeneralRe: Regular Expression Pin
Kentamanos29-Jan-04 21:32
Kentamanos29-Jan-04 21:32 
GeneralRe: Regular Expression Pin
Heath Stewart30-Jan-04 4:03
protectorHeath Stewart30-Jan-04 4:03 
Generalprevent re-opening of application Pin
azusakt29-Jan-04 19:46
azusakt29-Jan-04 19:46 
GeneralRe: prevent re-opening of application Pin
Kentamanos29-Jan-04 20:03
Kentamanos29-Jan-04 20:03 
GeneralRe: prevent re-opening of application Pin
Mazdak30-Jan-04 1:57
Mazdak30-Jan-04 1:57 
GeneralRe: prevent re-opening of application Pin
Heath Stewart30-Jan-04 4:00
protectorHeath Stewart30-Jan-04 4:00 
GeneralRe: prevent re-opening of application Pin
azusakt30-Jan-04 14:18
azusakt30-Jan-04 14:18 
GeneralRe: prevent re-opening of application Pin
Heath Stewart30-Jan-04 14:39
protectorHeath Stewart30-Jan-04 14:39 
GeneralRe: prevent re-opening of application Pin
Bo Hunter30-Jan-04 14:43
Bo Hunter30-Jan-04 14:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.