Click here to Skip to main content
15,925,255 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to write an eraser for layers Pin
rainfallc16-Apr-02 0:36
rainfallc16-Apr-02 0:36 
AnswerRe: how to write an eraser for layers Pin
Christian Graus16-Apr-02 2:01
protectorChristian Graus16-Apr-02 2:01 
GeneralRe: how to write an eraser for layers Pin
rainfallc16-Apr-02 4:23
rainfallc16-Apr-02 4:23 
GeneralRe: how to write an eraser for layers Pin
Christian Graus16-Apr-02 10:47
protectorChristian Graus16-Apr-02 10:47 
GeneralRe: how to write an eraser for layers Pin
rainfallc16-Apr-02 15:39
rainfallc16-Apr-02 15:39 
GeneralRe: how to write an eraser for layers Pin
Christian Graus16-Apr-02 16:55
protectorChristian Graus16-Apr-02 16:55 
GeneralRe: how to write an eraser for layers Pin
rainfallc16-Apr-02 18:28
rainfallc16-Apr-02 18:28 
GeneralRe: how to write an eraser for layers Pin
Christian Graus16-Apr-02 19:03
protectorChristian Graus16-Apr-02 19:03 
rainfallc wrote:
How could i set the Eraser`s mode , which just delete the current layers` content,.after i release the mouse button, lower layers show as before, but current layer`s image has changed?

By erasing by reseting the alpha channel in just the layer you are drawing on. Making an eraser would seem to suggest you'd be better not keeping track of individual shapes, but just bitmaps. It's not going to take long for your paint method to groan under the strain of rerendering all this stuff.

rainfallc wrote:
u said:
Make a vector of layer objects, a class that encapsulates the bitmap that represents the layer ( which has it's alpha channel set so that it can be drawn on top of lower layers correctly )

could u offer a short program for the suggestion above? do u mean to draw a bitmap with its alpha channel set on other layers` images?
thanks again


A short program ? No. Which part do you need help with ?


Christian

The tragedy of cyberspace - that so much can travel so far, and yet mean so little.

"But there isn't a whole lot out there that pisses me off more than someone leaving my code looking like they leaned on the keyboard and prayed that it would compile.
- Jamie Hale, 17/4/2002
GeneralRe: how to write an eraser for layers Pin
rainfallc16-Apr-02 19:52
rainfallc16-Apr-02 19:52 
GeneralRe: how to write an eraser for layers Pin
Christian Graus16-Apr-02 19:59
protectorChristian Graus16-Apr-02 19:59 
Generalgetting a dialog's dc Pin
John Oliver16-Apr-02 0:35
John Oliver16-Apr-02 0:35 
GeneralRe: getting a dialog's dc Pin
Paul M Watt16-Apr-02 5:33
mentorPaul M Watt16-Apr-02 5:33 
GeneralMultiple Selection with drag and Drop between TreeCtrls Pin
Luis Reina16-Apr-02 0:16
Luis Reina16-Apr-02 0:16 
QuestionToolbars in Dialogs? Pin
funbag15-Apr-02 23:33
funbag15-Apr-02 23:33 
AnswerRe: Toolbars in Dialogs? Pin
Christian Graus16-Apr-02 2:02
protectorChristian Graus16-Apr-02 2:02 
GeneralDistributed compiling with VStudio 6.0 Pin
Braulio Dez15-Apr-02 23:23
Braulio Dez15-Apr-02 23:23 
GeneralBlocking Sockets - and don´t get the last byte Pin
BtK15-Apr-02 23:12
BtK15-Apr-02 23:12 
GeneralRe: Blocking Sockets - and don´t get the last byte Pin
Le centriste16-Apr-02 3:17
Le centriste16-Apr-02 3:17 
QuestionWhy I Can't get WIM_DATA message in callback function 'waveInProc' ? Pin
Cloudway15-Apr-02 22:57
Cloudway15-Apr-02 22:57 
AnswerRe: Why I Can't get WIM_DATA message in callback function 'waveInProc' ? Pin
Cloudway15-Apr-02 23:09
Cloudway15-Apr-02 23:09 
QuestionHow to set the size of a scrollbox on the scrollbar? Pin
Feng Qin15-Apr-02 22:46
Feng Qin15-Apr-02 22:46 
GeneralSystem's ImageList Pin
Flatline15-Apr-02 21:45
Flatline15-Apr-02 21:45 
GeneralGetting the whole viewport size of SCrollView Pin
Flatline15-Apr-02 21:00
Flatline15-Apr-02 21:00 
GeneralMessage Box problem Pin
Yamuna15-Apr-02 18:27
Yamuna15-Apr-02 18:27 
GeneralRe: Message Box problem Pin
Christian Graus15-Apr-02 22:57
protectorChristian Graus15-Apr-02 22:57 

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.