|
-
Mar 31st, 2004, 07:25 PM
#1
Thread Starter
Lively Member
Layers of Images
Hi..
i want to move two layers of images (like photoshop) above each other..
for example.. suppose i have two images, one is circle and the other is square, both images background color is transparent, i want to allow the user to move these to images above each other freely..
how to do it??
do i need just 2 pictureboxs?? and how to drag them??
thanks..
¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸
(¯`·.¸¸.·´(¯`·.¸l VB-Sultan l¸.·´¯)`·.¸¸.·´¯)
`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`
-
Apr 1st, 2004, 02:44 AM
#2
Re: Layers of Images
Originally posted by VB-Sultan
Hi..
i want to move two layers of images (like photoshop) above each other..
for example.. suppose i have two images, one is circle and the other is square, both images background color is transparent, i want to allow the user to move these to images above each other freely..
how to do it??
do i need just 2 pictureboxs?? and how to drag them??
thanks..
eeh I've done that before umm what I did was that I drew the two shapes in one picturebox. Each shape had an object associated with it which held the drawing region in a variable (you need to know this for hit testing). when the user clicks on the picturebox, you just have to go through all the shapes that you have and do a hit test on all of them.
say you have a GraphicsPath object called p that represents your circle. Then to do a simple hit test you would just call p.IsVisible (adjustedMouseX, adjustedMouseY). The first shape that succeeds the hit test was the one clicked (then you have to have the shapes in order in an array or something to make sure you get to hit-test the top-most shape first)
eeh kinda gives you the idea, but I know I'm saying it really vague and incompletely
Last edited by MrPolite; Apr 1st, 2004 at 02:48 AM.
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Apr 1st, 2004, 05:06 AM
#3
Thread Starter
Lively Member
thanks for responding MrPolite..
if u clarify by coding it will be more understood..
¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸
(¯`·.¸¸.·´(¯`·.¸l VB-Sultan l¸.·´¯)`·.¸¸.·´¯)
`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`·.¸.·`
-
Apr 1st, 2004, 06:22 PM
#4
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|