![]() |
|
OpenLayer blitting logic :-\ |
Matthew Dalrymple
Member #7,922
October 2006
![]() |
I've been stuck on this problem for a while, no one seems to want or can help :-\. I'm back now to working on it. I've made progress from nothing showing to something showing This code is not in its natural form, I'm splicing it together to make one loop.
Aw screw it I don't feel like copying cTile->Draw into that loop here it is:
I am having to draw it double the size to get it to be the correct 1:1 scale size. And not all of the tiles draw correctly. I have sent output of the data to a log file and everything seems fine... I don't understand why some will draw now and others will not. Does BlitStretched stretch first then do the clipping based on the newly stretched image? Are my offsets in the drawing coords wrong? It seems weird that some tiles show up and others do not. What is most weird is that I have to multiply by 2 to get a normal sized tile. m-Height/Width are the correct value. Here's what this looks like when drawing with just Blit()
{"name":"correctnz1.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/0\/e061904fec5b3c5098ac68c47e2d8c7f.png","w":646,"h":505,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/0\/e061904fec5b3c5098ac68c47e2d8c7f"} Here's what this looks like when drawing with the loop above BlitStretched()
{"name":"wrongee9.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/3\/1390a2b7e472f0d39cca36c4feb8ca1a.png","w":646,"h":505,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/3\/1390a2b7e472f0d39cca36c4feb8ca1a"} =-----===-----===-----= |
Fladimir da Gorf
Member #1,565
October 2001
![]() |
Somehow, I think the issue is with Clipped in this case. Could you attach the whole project so that I could take a look? OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
Matthew Dalrymple
Member #7,922
October 2006
![]() |
Alright, the full project is attached to the original post. =-----===-----===-----= |
Fladimir da Gorf
Member #1,565
October 2001
![]() |
OK, I found the issue! Now stretching and clipping will work together. Though the stretching affects the original image, not the clipped part, so if you want double the normal size, you should pass double the size of the tiles-image. OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
Matthew Dalrymple
Member #7,922
October 2006
![]() |
Ok well how do I get this fixed version? I'm on the trunk directory of your SVN site. How do I grab everything at once and replace my old stuff? EDIT: I'm guessing their is some kind of CVS like tool to get the new ones. I guess I can just manually look for the files that were updated a few hours ago. =-----===-----===-----= |
juvinious
Member #5,145
October 2004
![]() |
You can grab a snapshot from my signature. __________________________________________ |
tobing
Member #5,213
November 2004
![]() |
Matthew: You may use TortoiseSVN to get stuff from any SVN depot. |
ImLeftFooted
Member #3,935
October 2003
![]() |
Whats that status on OL working on windows? |
tobing
Member #5,213
November 2004
![]() |
I have setup everything for MSVC 7.1 with project files for OL and all dependencies. Works like a charm. Most sources are from SVN resp. CVS though. |
Fladimir da Gorf
Member #1,565
October 2001
![]() |
Quote: Whats that status on OL working on windows?
Well, I have only Windows myself. I guess you mean MSVC OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
ImLeftFooted
Member #3,935
October 2003
![]() |
I'm using mingw and I can't get OL to compile, boat loads of compiler errors. |
Fladimir da Gorf
Member #1,565
October 2001
![]() |
Juvinious fixed some build stuff yesterday, maybe it works now? At least it does for me, and I'm using MingW as well. OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
Matthew Dalrymple
Member #7,922
October 2006
![]() |
Dustin Dettmer: Well if you are using the Dev-C++ IDE then you just grab OpenLayer and it grabs everything it depends on. Go to file->new->Project Then under the MultiMedia tab there is a nice little OpenLayer project template :-D. Let the compiling begin =-----===-----===-----= |
ImLeftFooted
Member #3,935
October 2003
![]() |
Sounds great but I'll need the source to do any real OL development |
tobing
Member #5,213
November 2004
![]() |
Either get the nightly snapshot or get the source from SVN directly. |
Matthew Dalrymple
Member #7,922
October 2006
![]() |
Alright, well I got the scaling to work at a scale of 1 and I think I'm having a bit of a logistics problem when it comes to tiling these tiles at a scaled transformation. I'm probably using the Scale too much or not enough, I know I must be using it in the wrong way. I think I'm close though. So any help on the correct formula for scale tiling?
=-----===-----===-----= |
juvinious
Member #5,145
October 2004
![]() |
ddustin said: I'm using mingw and I can't get OL to compile, boat loads of compiler errors. Could you post those errors and how you are compiling? __________________________________________ |
ImLeftFooted
Member #3,935
October 2003
![]() |
mkdir OpenLayer
|
juvinious
Member #5,145
October 2004
![]() |
DDustin: mkdir temp cd temp cmakesetup ../
From there you'll get a setup window, choose MinGW makefiles and then hit configure. You might want to fix anything that appears in red and set CMAKE_INSTALL_PREFIX to where you want openlayer to install to, ie c:/mingw. If everything is fine you should be able to just hit ok which then it'll have generated makefiles and drop you back to the cmd line. All you have to do then is 'make' and then 'make install'. __________________________________________ |
Matthew Dalrymple
Member #7,922
October 2006
![]() |
My Question still hasn't been answered :-P I got 1 tile to scale horizontally (not vertically too =-----===-----===-----= |
|