Jump to content

  • Log In with Google      Sign In   
  • Create Account


Highlight speed question


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Darkening   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 January 2000 - 08:19 AM

I would like to implent an highlighting feature in my engine. Like when your mouse is over an object in Baldur''s Gate, the contour of the object becomes highlighted. I figured two way of doing this: - First one, change my bitmap of the object to include a single pixel line, which is very close to the key color of the blit, around it. When I would blit the object, I would spread the the key color to include or not the highlight line. - Second one, do it all with a draw line function. Which seems to me pretty slow and hard to implent. So which one is the faster ? And fell free to tell me your ideas on this and give other ways of doing it.

Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9125

Like
Likes
Like

Posted 08 January 2000 - 08:41 PM

Assuming your sprites have proper masks, you can extract the mask and do edge detection on it. This will give you the outline of the figure. You may need to enlarge and crop it to get it to be around your figure properly. From there you can either use this as a mask for whatever highlighting you want to do or just transform it into a highlight image.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS