Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / ugh..problems with program, can anyone give me an example?

Author
Message
RebirthAnime
21
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 23rd Mar 2004 21:03
Arg..still can't get my image viewer program to work right, if you don't know I'm trying to make a program that loads an image to the screen and fits the window to the size of the image (whether scaled down or not) and locks the window to the screen so you can draw behind it or whatever. I've got it to lock, and on certain images it'll scale right, I guess the way the images are shaped they just fit or something, but I can't get other images than the one I test it with, to work right..I think I've probably started the whole program off wrong. Can someone give an example of a program that'll load the image to the screen and fit the window to the image's width and height..I've tried that with a few different things people have showed me but all have failed, it just doesn't fit it to the image size right, it just makes the window bigger or smaller and the image also so it retains partially visible and not...any help would be GREATLY appreciated, I'm trying to make this to solve my problems with having to swap between windows while trying to use an image as a reference, any computer artists out there will probably understand what I mean < In case anyone wants me to post my code to see what I'm doing wrong or whatever it's in the code slot...I've rem'd out stuff that I'm eitehr not using at the moment or are just tests for things and what not..so please excuse the jumbledness
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 23rd Mar 2004 22:07
Why don't you create a plain, assign the image to the plain, and then scale (stretch) the plain to fit the screen? You'll probably have to tweak the plain and camera position to get a perfect fit, but it is doable. I suggest offsetting the plain as needed (-width/2 and -height/2) and parking the camera at 0, some fixed height, 0.
--
TAZ

RebirthAnime
21
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 24th Mar 2004 04:34
yea..I could try that, I was hoping to try to keep it as 2d oriented as possible so my friends could use it too if they wanted to, but I'll give that a try

Login to post a reply

Server time is: 2024-09-22 02:34:33
Your offset time is: 2024-09-22 02:34:33