alexvoz / as3isolib

Automatically exported from code.google.com/p/as3isolib
0 stars 0 forks source link

Bitmap Fill not positioned correctly for IsoBox top, front and right faces. Dimensional offset #19

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create an isoBox of any given width, length and height
2. apply a bitmap fill of matching width and length to the top face
3. notice the bitmap seems to be offset from the expected origin of the face

What is the expected output? What do you see instead?
The bitmap image should match the intended point of the applied-to face

Please use labels and text to provide additional information.

Original issue reported on code.google.com by jwopitz on 9 Jun 2009 at 5:00

GoogleCodeExporter commented 9 years ago
Apart from the fact it is offset a bit, I have another question. Given that my 
bitmap contains a line parallel to its bottom, should the line by also parallel 
to the bottom of the IsoBox?

Original comment by marek...@gmail.com on 29 Jan 2011 at 12:35

GoogleCodeExporter commented 9 years ago
You'd need to show me an example of what you are talking about

Original comment by jwopitz on 29 Jan 2011 at 5:17

GoogleCodeExporter commented 9 years ago
When we apply a texture orientation is not with the same distortion of isobox 
ans the texture start od middle of isobox.

Original comment by victorpo...@gmail.com on 25 Aug 2011 at 8:39

Attachments:

GoogleCodeExporter commented 9 years ago
Line 223 of IsoBox.as
should be m.tx += lft.x;

and there is a problem if you use the same fill object for all the faces (which 
happens for example if you use fill setter, like "someBox.fill = someFill;"), 
then matrix for the fill changes first for the front-left face, then the same 
(changed) matrix changes again for the front-right face, so by the time it gets 
to the top face it's really messed up. You can fix it by changing "set faces()" 
to clone each fill before adding it to the vector.

Original comment by alie...@gmail.com on 20 Oct 2011 at 7:01

GoogleCodeExporter commented 9 years ago
The solution in previous comment works for pre-isometric bitmaps for the face
but in the case of using IsoOrientation it becomes offset. You can just add the 
correct translation in IsoDrawingUtil.getIsoMatrix() to fix it.

Original comment by alie...@gmail.com on 20 Oct 2011 at 9:29

GoogleCodeExporter commented 9 years ago
Alie can you send me a patch for this fix?

Original comment by jwopitz on 23 Nov 2011 at 8:20