iNET Interactive - Online Advertising Agency
          
Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Interface and Graphics > Reshape an image (Rectangle) into a Trapeziod.


Reply
 
Thread Tools Display Modes
  #1  
Old 03-04-2004, 12:44 PM
purebuu purebuu is offline
Newcomer
 
Join Date: Mar 2004
Posts: 17
Question Reshape an image (Rectangle) into a Trapeziod.

Ok i am completely stumped. if it is at all possible, i want to turn a normal rectangular image into a new shape, specifically a trapezium.

000000000 000000
000000000 0000000
000000000 > 00000000 i know very poor demonstration.
000000000 000000000
000000000 0000000000

I can manged this in a normal graphical program but i was wondering if it was at all possible to do this in VB.

I am not very experienced with complex code, and got completely stumped when looking at using directx, which i believed was a possible route to create such an image. I have looked into the use of GetPixel and SetPixel etc. but not found any way to actually turn an image into a trapezium shape.

thanx for any help anyone can give.
Reply With Quote
  #2  
Old 03-04-2004, 05:52 PM
rpgnewbie's Avatar
rpgnewbie rpgnewbie is offline
Contributor
 
Join Date: Sep 2003
Location: Portland OR
Posts: 581
Default Trapezoid Stretchblt with mask

Quote:
Originally Posted by purebuu
Ok i am completely stumped. if it is at all possible, i want to turn a normal rectangular image into a new shape, specifically a trapezoid

thanx for any help anyone can give.



You can use Strecthblt with Masking to achieve this. Please check out post #4 on this thread:
http://www.xtremevbtalk.com/t142232.html

It has screenshots and a link to a zip attachment.

The technique can be modified to "warp" a rectangular bitmap into any type/size/shape trapezoid image...
Reply With Quote
  #3  
Old 03-05-2004, 04:39 AM
purebuu purebuu is offline
Newcomer
 
Join Date: Mar 2004
Posts: 17
Default

thnx "RPGNEWBIE" lol doubt newbie, i search'd days looking how to do that... aint checked the code out fully to change to my prog but it will sure help... now that i kno it is possible...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to switch an image after selecting from a ControlList... FunkMaster .NET Interface and Graphics 2 03-15-2004 03:14 PM
Need Help with Image drag and drop sap220 General 2 07-18-2003 10:10 AM
PUblic array With images NeverMore5 Game Programming 3 02-07-2003 02:59 PM
Image Archive usetheforce2 Tech Discussions 4 03-31-2002 02:58 AM
BitBlt Defiance General 2 06-17-2001 05:04 PM

Advertisement: