View Single Post
  #5  
Unread 07-17-2006, 06:16 AM
Zonx's Avatar
Zonx Zonx is offline
A Green Troll
This person is a EQ2Map developer.
Featured
 
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
Default

Fairly sure you can't alter the source rect of an image. The EQ2 client doesn't actually load the source image, just the individual slices defined by various sourcerects. You may be able to reduce the sourcerect, but I doubt the client will pull new pixels from the source image after the slice has been loaded.

One option is to define the sourcerect large enough to include all the required imagery. Place the image inside a page container, then manipulate the image location and page size to clip the image as needed. This option could potentially save some memory but may require a bit more programming and processing.

Another option is to define multiple imageStyles, then swap imageStyles and sizes as needed. The Map window uses this method to change maps. Potentially requires more memory if you're image slices overlap the same pixels in the source image. A bit less programming and processing than the first option.

Yet another option is to define multiple imageStyles, stack multiple images each referencing a different imageStyle, and hide/show as needed. This is how the Targeting window handles mob tier indicators. Probably requires a bit more memory than the first option. Probably the easiest to program since the images are pre possitioned and simply need to be hidden/shown.
Reply With Quote