Click here to Skip to main content
16,004,901 members
Home / Discussions / C#
   

C#

 
GeneralRe: What causes the close button to stop working? Pin
vektuz6-Dec-03 10:28
vektuz6-Dec-03 10:28 
GeneralRe: What causes the close button to stop working? Pin
vektuz6-Dec-03 11:00
vektuz6-Dec-03 11:00 
GeneralInvertRegion Pin
mhmoud rawas5-Dec-03 22:09
mhmoud rawas5-Dec-03 22:09 
GeneralRe: InvertRegion Pin
Alex Korchemniy6-Dec-03 7:53
Alex Korchemniy6-Dec-03 7:53 
GeneralRe: InvertRegion Pin
mhmoud rawas6-Dec-03 8:40
mhmoud rawas6-Dec-03 8:40 
GeneralRe: InvertRegion Pin
J. Dunlap6-Dec-03 9:42
J. Dunlap6-Dec-03 9:42 
GeneralRe: InvertRegion Pin
mhmoud rawas6-Dec-03 18:00
mhmoud rawas6-Dec-03 18:00 
GeneralRe: InvertRegion Pin
J. Dunlap7-Dec-03 14:56
J. Dunlap7-Dec-03 14:56 
Use a ColorMatrix to transform the colors to negative, and set the Graphics object's clipping region to the region to be inverted.

//assumes that b is the Bitmap to be inverted.
ImageAttributes ia = new ImageAttributes();
ColorMatrix cm=new ColorMatrix();
cm.Matrix00=
cm.Matrix11=
cm.Matrix22=-1;
ia.SetColorMatrix(cm);
 
GraphicsPath path=new GraphicsPath();
path.AddEllipse(new Rectangle(20,20,200,200));
Region rgn=new Region(path);
e.Graphics.SetClip(rgn,CombineMode.Replace);
 
e.Graphics.DrawImage(b,
            new Rectangle(0, 0, b.Width, b.Height)
            , 0, 0, b.Width, b.Height, GraphicsUnit.Pixel, ia);



"Have a heart that never hardens, a temper that never tires, a touch that never hurts." -- Charles Dickens

FLUID UI Toolkit | FloodFill in C# & GDI+







GeneralJPG Size Pin
mhmoud rawas5-Dec-03 22:07
mhmoud rawas5-Dec-03 22:07 
GeneralRe: JPG Size Pin
Heath Stewart6-Dec-03 4:57
protectorHeath Stewart6-Dec-03 4:57 
GeneralRe: JPG Size Pin
Anonymous6-Dec-03 6:23
Anonymous6-Dec-03 6:23 
GeneralRe: JPG Size Pin
Heath Stewart6-Dec-03 6:44
protectorHeath Stewart6-Dec-03 6:44 
GeneralRe: JPG Size Pin
mhmoud rawas6-Dec-03 7:22
mhmoud rawas6-Dec-03 7:22 
GeneralRe: JPG Size Pin
mhmoud rawas6-Dec-03 7:24
mhmoud rawas6-Dec-03 7:24 
GeneralRe: JPG Size Pin
mhmoud rawas6-Dec-03 7:17
mhmoud rawas6-Dec-03 7:17 
GeneralFile Size over Internet Pin
eggie55-Dec-03 21:06
eggie55-Dec-03 21:06 
GeneralRe: File Size over Internet Pin
leppie5-Dec-03 21:51
leppie5-Dec-03 21:51 
GeneralRe: File Size over Internet Pin
Heath Stewart6-Dec-03 4:50
protectorHeath Stewart6-Dec-03 4:50 
GeneralRe: File Size over Internet Pin
eggie56-Dec-03 11:20
eggie56-Dec-03 11:20 
GeneralIdentifying the Web Server Pin
eggie55-Dec-03 15:07
eggie55-Dec-03 15:07 
GeneralRe: Identifying the Web Server Pin
eggie55-Dec-03 16:05
eggie55-Dec-03 16:05 
GeneralRe: Identifying the Web Server Pin
Heath Stewart6-Dec-03 4:49
protectorHeath Stewart6-Dec-03 4:49 
GeneralRe: Identifying the Web Server Pin
eggie56-Dec-03 5:54
eggie56-Dec-03 5:54 
GeneralRe: Identifying the Web Server Pin
Heath Stewart6-Dec-03 6:36
protectorHeath Stewart6-Dec-03 6:36 
GeneralRe: Identifying the Web Server Pin
eggie56-Dec-03 11:25
eggie56-Dec-03 11:25 

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.