Click here to Skip to main content
15,889,992 members
Home / Discussions / C#
   

C#

 
GeneralRe: Printing from a webservice Pin
nathanreynolds17-Feb-04 16:27
nathanreynolds17-Feb-04 16:27 
GeneralRe: Printing from a webservice Pin
Heath Stewart17-Feb-04 19:32
protectorHeath Stewart17-Feb-04 19:32 
GeneralRe: Printing from a webservice Pin
nathanreynolds18-Feb-04 2:27
nathanreynolds18-Feb-04 2:27 
GeneralRe: Printing from a webservice Pin
Heath Stewart18-Feb-04 4:11
protectorHeath Stewart18-Feb-04 4:11 
GeneralA GDI+ newbie problem Pin
cemlouis16-Feb-04 11:28
cemlouis16-Feb-04 11:28 
GeneralRe: A GDI+ newbie problem Pin
Charlie Williams16-Feb-04 16:14
Charlie Williams16-Feb-04 16:14 
GeneralRe: A GDI+ newbie problem Pin
cemlouis17-Feb-04 3:50
cemlouis17-Feb-04 3:50 
GeneralFill 50% of a drawing with a color Pin
r916-Feb-04 9:32
r916-Feb-04 9:32 
Hi.

Can someone show me how to fill 50% of the below drawing with a solid color.
From buttom to top.

Thanks
Regards r9


The 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);
}




GeneralRe: Fill 50% of a drawing with a color Pin
Heath Stewart16-Feb-04 9:45
protectorHeath Stewart16-Feb-04 9:45 
GeneralRe: Fill 50% of a drawing with a color Pin
r916-Feb-04 9:48
r916-Feb-04 9:48 
GeneralRe: Fill 50% of a drawing with a color Pin
Heath Stewart16-Feb-04 10:25
protectorHeath Stewart16-Feb-04 10:25 
GeneralRe: Fill 50% of a drawing with a color Pin
je_gonzalez16-Feb-04 12:54
je_gonzalez16-Feb-04 12:54 
QuestionHow to referenc functions in other code file Pin
klufy16-Feb-04 8:28
klufy16-Feb-04 8:28 
AnswerRe: How to referenc functions in other code file Pin
Colin Angus Mackay16-Feb-04 8:57
Colin Angus Mackay16-Feb-04 8:57 
GeneralRe: How to referenc functions in other code file Pin
klufy16-Feb-04 9:29
klufy16-Feb-04 9:29 
GeneralRe: How to referenc functions in other code file Pin
Colin Angus Mackay16-Feb-04 9:42
Colin Angus Mackay16-Feb-04 9:42 
GeneralRe: How to referenc functions in other code file Pin
Heath Stewart16-Feb-04 9:43
protectorHeath Stewart16-Feb-04 9:43 
GeneralRe: How to referenc functions in other code file Pin
klufy16-Feb-04 10:50
klufy16-Feb-04 10:50 
GeneralRe: How to referenc functions in other code file Pin
obelisk2916-Feb-04 11:23
obelisk2916-Feb-04 11:23 
GeneralRe: How to referenc functions in other code file Pin
klufy16-Feb-04 11:28
klufy16-Feb-04 11:28 
GeneralRe: How to referenc functions in other code file Pin
Heath Stewart17-Feb-04 2:58
protectorHeath Stewart17-Feb-04 2:58 
Generalcreating an app to track user input Pin
kym34516-Feb-04 8:06
kym34516-Feb-04 8:06 
GeneralRe: creating an app to track user input Pin
CWIZO16-Feb-04 8:17
CWIZO16-Feb-04 8:17 
GeneralRe: creating an app to track user input Pin
apferreira16-Feb-04 13:18
apferreira16-Feb-04 13:18 
GeneralSMTP Help Pin
mina_aziz16-Feb-04 7:00
mina_aziz16-Feb-04 7:00 

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.