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.

AppGameKit Classic Chat / Render To Image ? must it be the entire screen ?

Author
Message
haliop_New
User Banned
Posted: 6th Oct 2015 09:50
could I use RenderToImage like GetImage(sx,sy,ex,ey) ?

what if I want just a portion of the screen ? isn't that possible ?

so RenderToImage(render_image,startX#.startY#.endX#,endY#,depth)

?
I bet it is faster then Getimage...
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Oct 2015 15:39
RenderToImage() doesn't really work like that.
You can make the Render Image any size (to ^2, e.g 256x256, 1024x1024)

Once you set renderToImage(), everything you do goes to the image instead of the screen. So you are not doing a GetImage() [a copy], but you are creating an original image that doesn't exist anywhere else.

What you must remember is that the coordinates you use on the Render Image are still the same as the virtual dimensions of the screen. So
if your screen is 19080x1080 and
your Render Image is 512x512
to put something in the middle of the Render image (256,256) you must place it at 960,540
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
JSR $FFD2
9
Years of Service
User Offline
Joined: 16th May 2015
Location: Sweden
Posted: 2nd Jan 2016 15:51
Help me with "RenderToImage", do not understand how it works !?
See my faltering attempts!

first method works: here I set the "Virtual Resolution" to the size of the newly created "image"
- I use DrawBox, DrawLine or whatever..............
- Then i setting back the "Virtual resolution" to the original size


second methods works: I use "SetClearColor" and "Clear Screen", I do not change the resolution.


third method does not work: why not ?? I have tried all possible and impossible coordinates!


I would be very happy if someone has the time to show a working example,
preferably correcting my third example!
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 2nd Jan 2016 17:15
but 960 isn't half of 19080
V2 T1 (Mostly)
Phone Tap!
Uzmadesign

Login to post a reply

Server time is: 2024-11-25 13:54:03
Your offset time is: 2024-11-25 13:54:03