Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Drawing and moving a Character Transparently (Not a Sprite)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-07-2008, 09:48 AM
Junior Member
 
Join Date: Sep 2008
Posts: 15
Default Drawing and moving a Character Transparently (Not a Sprite)

Hi,

In all the Libraries that come with Basic4ppc and the large ammount that
users have contributed can the following be implemented from VB6!

Public Sub drawHero()
BitBlt frmBitBlt.hDC, 50, 50, 30, 30, frmBitBlt.Hero.hDC, 0, 0, vbSrcPaint
End Sub

Public Sub drawMask()
BitBlt frmBitBlt.hDC, 50, 50, 30, 30, frmBitBlt.HeroMask.hDC, 0, 0, vbSrcAnd
End Sub

Public Sub drawBground()
BitBlt frmBitBlt.hDC, 50, 50, 300, 300, frmBitBlt.Land.hDC, 0, 0, vbSrcCopy
End Sub


This can be used to Draw and move a character Transparently on a
complex background.


Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 10-07-2008, 06:21 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

See this example: http://www.basic4ppc.com/files/BouncingSmiley.zip
Reply With Quote
  #3 (permalink)  
Old 10-08-2008, 03:15 PM
Junior Member
 
Join Date: Sep 2008
Posts: 15
Default Drawing and moving a Character Transparently (Not a Sprite)

Thanks Erel,

I already downloaded and tried the Smiley example and found it
very flickery, also as I added other images the flickering got worse!

I also think the ammount of code/math required adds to this flickering.

rectSrc.New1(0,0,bmp.Width,bmp.Height) 'The source rectangle.
rectDest.New1(120,120,30,30) 'The target rectangle.
rectDest2.New1(120,120,40,40)
drawer.DrawImage1(bmp.Value,rectSrc.Value,rectDest .Value,true)
drawer.DrawImage1(bmp.Value,rectSrc.Value,rectDest 2.Value,true)

All this for one image!
This is what slows everything up I think.

I require 36 images on the screen at any one time!

What would be involved in creating a BitBlt library for Basic4ppc
based on the VB.NET.Auto Function BitBlt Lib "GDI32.DLL"

Thanks once again for all your help...
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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Walking character using the Sprite library Erel Code Samples & Tips 5 05-14-2010 04:22 AM
How to create sprite/ moving figures? Stellaferox Questions (Windows Mobile) 14 12-31-2008 08:30 AM
Diff GPS values without moving GPS mouse Georg Questions (Windows Mobile) 1 04-22-2008 06:58 AM
moving a sprite? colin9876 Questions (Windows Mobile) 7 11-27-2007 04:10 PM
Error when moving treeview to a tabcontrol Peter Questions (Windows Mobile) 2 05-15-2007 06:36 AM


All times are GMT. The time now is 02:37 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0