XOR mode...
-
I want to draw a shape by mouse. But I can not find out the way to use XOR mode in C#. Can you show me a sample for this issue? Thanks
-
There is a class called ControlPaint. It has limted XOR drwaing functions like DrawReversibleFrame etc. Look at that.
-
I want to draw a shape by mouse. But I can not find out the way to use XOR mode in C#. Can you show me a sample for this issue? Thanks
-
I think ^ is what you want. Mazy **"If I go crazy then will you still Call me Superman If I’m alive and well, will you be There holding my hand I’ll keep you by my side with My superhuman might Kryptonite"**Kryptonite-3 Doors Down
Mazdak wrote: I think ^ is what you want. :confused: :confused:
-
Mazdak wrote: I think ^ is what you want. :confused: :confused:
-
I want to draw a shape by mouse. But I can not find out the way to use XOR mode in C#. Can you show me a sample for this issue? Thanks
XOR mode drawing isn't supported in GDI+ because its use was considered a hack since you couldn't control the color that was output from its operation. The recommended solution is to do your drawing so that you don't need XOR mode; or emulate it. For instance if you were creating a progress bar control that showed the percentage in the middle (ala most setup programs) you would draw the text twice; once with the clipping set to just the area that is being filled; again with it set to the area not being filled choosing appropriate colors both times. This is a GOOD thing though; because then font features such as antialising and cleartype will work; where as they won't if you blit to a bitmap then xor the bitmap onto another one. James "Java is free - and worth every penny." - Christian Graus
-
XOR mode drawing isn't supported in GDI+ because its use was considered a hack since you couldn't control the color that was output from its operation. The recommended solution is to do your drawing so that you don't need XOR mode; or emulate it. For instance if you were creating a progress bar control that showed the percentage in the middle (ala most setup programs) you would draw the text twice; once with the clipping set to just the area that is being filled; again with it set to the area not being filled choosing appropriate colors both times. This is a GOOD thing though; because then font features such as antialising and cleartype will work; where as they won't if you blit to a bitmap then xor the bitmap onto another one. James "Java is free - and worth every penny." - Christian Graus
-
I want to draw a shape by mouse. But I can not find out the way to use XOR mode in C#. Can you show me a sample for this issue? Thanks
Check out this link: http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q314945& This works only with rectangles and lines. Øyvind
-
I thought he want XOR operator in C# and ^ do it. Mazy **"If I go crazy then will you still Call me Superman If I’m alive and well, will you be There holding my hand I’ll keep you by my side with My superhuman might Kryptonite"**Kryptonite-3 Doors Down
He wants the XOR mode when drawing. Christian I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002