Click here to Skip to main content
15,881,898 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: paint application question Pin
lfsong1-May-03 17:55
lfsong1-May-03 17:55 
GeneralRe: paint application question Pin
James T. Johnson1-May-03 18:06
James T. Johnson1-May-03 18:06 
GeneralRe: paint application question Pin
lfsong2-May-03 5:30
lfsong2-May-03 5:30 
GeneralRe: paint application question Pin
James T. Johnson2-May-03 14:57
James T. Johnson2-May-03 14:57 
GeneralRe: paint application question Pin
lfsong2-May-03 19:03
lfsong2-May-03 19:03 
GeneralRe: paint application question Pin
James T. Johnson2-May-03 23:00
James T. Johnson2-May-03 23:00 
GeneralRe: paint application question Pin
lfsong4-May-03 18:46
lfsong4-May-03 18:46 
GeneralRe: paint application question Pin
J. Dunlap4-May-03 18:57
J. Dunlap4-May-03 18:57 
LynnSong wrote:
It seems that GDI+ hasn't packaged the windows API all around,

GDI+ is not a GDI wrapper, it is a whole new implementation.

LynnSong wrote:
It seems that GDI+ donnot have a XOR operation to use, can I call GDI's XOR op?

GDI+ does not have one. You can call GDI's version by doing
hdc=Graphics.GetHDC();
//*draw on hdc here
//*you CANNOT draw on the Graphics object thru GDI+ until 
//you've released the DC
Graphics.ReleaseHDC();
//*hdc is invalid now
//*you can do things on the Graphics now



LynnSong wrote:
I want to realize a eraser tool, it could set pixels on the bitmap buffer to transparent.

Do you mean actually transparent, or do you want to make the area erased revert back to the original bitmap?

If you mean actually transparent, you will have to modify the Alpha channel of the bitmap.

If you mean revert to the original, then you can keep a copy of the original version of the bitmap and copy pixels from the original to the new version wherever the eraser is used.

But for either of these, you cannot really depend on the GDI+ brush class. You will have to modify the pixels by your own code.

If you want to just erase to the background color, just use a brush of the same color as the background (you likely knew this already Smile | :) ).


"Do unto others as you would have them do unto you." - Jesus

"An eye for an eye only makes the whole world blind." - Mahatma Gandhi







GeneralRe: paint application question Pin
lfsong4-May-03 22:52
lfsong4-May-03 22:52 
GeneralRe: paint application question Pin
James T. Johnson4-May-03 19:05
James T. Johnson4-May-03 19:05 
GeneralRe: paint application question Pin
J. Dunlap4-May-03 19:36
J. Dunlap4-May-03 19:36 
GeneralRe: paint application question Pin
James T. Johnson4-May-03 20:24
James T. Johnson4-May-03 20:24 
GeneralRe: paint application question Pin
J. Dunlap4-May-03 20:29
J. Dunlap4-May-03 20:29 
GeneralRe: paint application question Pin
lfsong4-May-03 23:36
lfsong4-May-03 23:36 
GeneralRe: paint application question Pin
James T. Johnson5-May-03 1:01
James T. Johnson5-May-03 1:01 
QuestionAm I running as a native image? Pin
solidstore29-Apr-03 1:20
solidstore29-Apr-03 1:20 
AnswerRe: Am I running as a native image? Pin
Stephane Rodriguez.29-Apr-03 2:18
Stephane Rodriguez.29-Apr-03 2:18 
GeneralLow level network application Pin
Andrei Matei28-Apr-03 22:29
Andrei Matei28-Apr-03 22:29 
GeneralRe: Low level network application Pin
Andy Davey29-Apr-03 16:16
Andy Davey29-Apr-03 16:16 
Generalcall to the main thread Pin
OmegaSupreme28-Apr-03 15:59
OmegaSupreme28-Apr-03 15:59 
GeneralRe: call to the main thread Pin
Andy Davey28-Apr-03 16:24
Andy Davey28-Apr-03 16:24 
GeneralRe: call to the main thread Pin
OmegaSupreme28-Apr-03 16:54
OmegaSupreme28-Apr-03 16:54 
GeneralRe: call to the main thread Pin
david.minor3-May-03 18:51
david.minor3-May-03 18:51 
GeneralRe: call to the main thread Pin
Andy Davey5-May-03 21:24
Andy Davey5-May-03 21:24 
QuestionWill my .Net C# programs work on other OSs...? Pin
eggie528-Apr-03 14:41
eggie528-Apr-03 14:41 

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.