Difference between scissor and rectangle sizes.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
sanjiv
Citizen
Posts: 88
Joined: Mon Feb 27, 2012 5:11 am

Difference between scissor and rectangle sizes.

Post by sanjiv »

When I use the same coordinates and dimensions for love.graphics.rectangle and love.graphics.setScissor, they don't match up. Is that a general problem, or am I missing something?

The general code I used to test this was

local lg=love.graphics
lg.rectangle('line',x,y,w,h)
lg.setScissor(x,y,w,h)
lg.rectangle('fill',x,y,w,h)
User avatar
slime
Solid Snayke
Posts: 3134
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Difference between scissor and rectangle sizes.

Post by slime »

[wiki]love.graphics.setScissor[/wiki] isn't affected by graphics transformations (love.graphics.push/translate/rotate/scale/etc).
User avatar
sanjiv
Citizen
Posts: 88
Joined: Mon Feb 27, 2012 5:11 am

Re: Difference between scissor and rectangle sizes.

Post by sanjiv »

yup, that solved it. My bad.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 84 guests