Draw a subrectangle of the image in the format as Librasterworks

High-level languages programming questions
Post Reply
qullarwee
Posts: 25
Joined: Wed Apr 05, 2023 5:41 pm
Has thanked: 6 times
Been thanked: 8 times

Draw a subrectangle of the image in the format as Librasterworks

Post by qullarwee »

Hello.
I am writing in C. I have a buffer that I drew on with librasterworks, and now I want to draw any of its subrectangles. This cannot be done with SysFn7. I have only one option: to run a two-dimensional loop over the desired subrectangle and do a SetPixel, but I think that would be bad from a performance point of view. Are there any better ways?
User avatar
dunkaist
Mentor
Posts: 742
Joined: Mon Oct 19, 2009 10:58 am
Has thanked: 9 times
Been thanked: 10 times

Re: Draw a subrectangle of the image in the format as Librasterworks

Post by dunkaist »

Hi qullarwee,

Look at SysFn65. Its params may seem tricky though.
qullarwee
Posts: 25
Joined: Wed Apr 05, 2023 5:41 pm
Has thanked: 6 times
Been thanked: 8 times

Re: Draw a subrectangle of the image in the format as Librasterworks

Post by qullarwee »

It works. Thank you.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests