Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 07-11-2008, 08:49 PM   #1 (permalink)
Right Off the Assembly Line
 
pavilion's Avatar
 
Join Date: Sep 2008
Posts: 12
Default how to simulate the image layer , like the one in Photoshop


I try to write my own Paint program , and I wonder how to create the "layer system" , like Photoshop , Paint.NET 's features , I try to draw multiple stacked images on form , but it just works terribly .
Anyone got an idea of how to do it ? Just an idea , don't give me the source code ,ok . Thanks ^^
pavilion is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 07-11-2008, 09:33 PM   #2 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default Re: how to simulate the image layer , like the one in Photoshop

What graphics library are you using? If it supports alpha channels why not just draw the layers one over another using it? Layers are much like an undo stack otherwise. Each new action needs to be drawn and every change in the stack prompts a redraw.

There are things known (in Qt) as Composition modes. Based on how the layers are to be ordered, you set the composition modes appropriately and draw the stack over the destination image area. The QPainter class does this very well.

You can see an example here: http://doc.trolltech.com/qq/qq17-compositionmodes.html

I don't know the low level implementation of this, if thats what you are asking.
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Photoshop:Text, with image as filler (vid) karnivore Tutorials 2 03-09-2007 11:00 PM
Photoshop: Image Reflection goobimama Tutorials 17 01-02-2007 12:19 PM
How to move image in Adobe Photoshop suniltr77 Software Q&A 2 07-09-2006 01:59 PM
Photoshop:: Image Effects: iPod Ad Style! goobimama Tutorials 7 09-11-2005 01:22 PM
Photoshop text layer styles & photoshop auto actions wanted! jitu_mania QnA (read only) 1 21-03-2005 12:43 AM

 
Latest Threads
- by gforz
- by soumya
- by Sujeet
- by icebags
- by Charan

Advertisement




All times are GMT +5.5. The time now is 02:58 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2