Skip to content

[textures] ImageDraw() rectangle clipping doesn't look right #3259

@mattj1

Description

@mattj1

I was recently using ImageDraw and passing negative coordinates for the destination rectangle, which resulted in some graphical glitches.

Shouldn't this say srcRec.x -= dstRec.x; ? Line 3366 would be updated accordingly as well.

srcRec.x = -dstRec.x;

I tried pre-clipping the coordinates, such that dstRec.X was never negative, before calling ImageDraw which fixed it for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions