How do I crop images?

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
Yolwoocle
Prole
Posts: 8
Joined: Sun Jan 16, 2022 11:12 am

How do I crop images?

Post by Yolwoocle »

Title says it all. How do I crop images to draw them using

Code: Select all

love.grpahics.draw
afterwards. Thought it was the kx and ky arguments but apparently not.
User avatar
zorg
Party member
Posts: 3435
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: How do I crop images?

Post by zorg »

You don't, because there's no such thing as love.grpahics

Also, love.graphics.draw does not support cropping by itself, you need to use a Quad to do this, as one solution... and i'm somewhat certain this was answered on discord already.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
idbrii
Prole
Posts: 34
Joined: Sat Jun 12, 2021 5:07 am

Re: How do I crop images?

Post by idbrii »

You could draw with love.graphics.setScissor to define a "window" that your drawn image is visible through.
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests