• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Embossing a sprite on an image background

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello again!
I positioned a sprite on an image background. Problem is whenever i scroll the background, the sprite doesn't move with it. Is there a way to fix a sprite on a certain area on the image and its movement will be with its background?
tnx
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I would suggest you to create a background bufer image, get the image graphics, draw in this graphics the image you want to be fixed and then move the bufer.
Cheers,
Pavlin
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi!!!
Need your help on that..
how to create a background picture..
i am loading the image but i am not able to resize the image's width/height as per the canvas width/height. as a result of that there is some white area left.
also as the canvas's width/height can change(depending on the screen size) i don't want to specify the image's width/height
help needed
 
bab javier
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Pavlin. its working!
now i have another problem, those sprites that i have embossed are not interactive. they can't collide with other sprites. i think it has been converted or treated as an image.
Puneet:
are u making a program for a Nokia phone? if yes, u can use DirectUtils.createImage(width, height, ARGBcolor). this will make the whites transparent.
if u want ur image to fit the whole canvas, i would suggest that u make or have a graphic designer make an image that has ur canvas dimensions. i won't recommend that u resize (through code) ur image for it will be blurred. the pixels usually "explode".
hope this helps.
 
You don't like waffles? Well, do you like this tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic