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

.NET (Core and Framework)

 
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 
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 
LynnSong wrote:
So after MouseUp state, the whole 'free line' has a quite ugly look, while what I want is a free line with sigle alpha value so it will has a clear and correct look.

One thing you can do is to not draw on the layer bitmap until you get a mouseup event, so what you would do is have a collection of points representing each part of the mousemove event, in your OnPaint method you draw the layers behind and including the current layer, then you draw your lines with alpha blending (using the DrawLines method), then draw the layers on top of the current layer.

Once you get the MouseUp event then you can draw your lines onto the bitmap for that layer.

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

This is a bit more difficult to handle because you need to allow all colors, but yet one particular color needs to be made transparent. Perhaps someone else can offer a suggestion for how you would go about that.

The eraser tool is basically going to do a FillRectangle with the color that represents the transparent color used in the SolidBrush.

James

"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation

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 
AnswerRe: Will my .Net C# programs work on other OSs...? Pin
J. Dunlap28-Apr-03 16:05
J. Dunlap28-Apr-03 16:05 
AnswerRe: Will my .Net C# programs work on other OSs...? Pin
OmegaSupreme28-Apr-03 16:11
OmegaSupreme28-Apr-03 16:11 

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.