Skip to content

Bug: Fix Surface.draw_texture's NinePatchTexture handling #1705

Closed
@pushfoo

Description

@pushfoo

Bug Report

Actual behavior:

arcade.gui.Surface.draw_texture has following incorrect behavior:

  1. The check for angle uses x and y arguments
  2. The check for alpha uses x and y arguments

if isinstance(tex, NinePatchTexture):
if x != 0 or y != 0:
raise ValueError("Ninepatch does not support a position != (0,0) yet")
if x != 0 or y != 0:
raise ValueError("Ninepatch does not support a angle != 0 yet")
if x != 0 or y != 0:
raise ValueError("Ninepatch does not support a alpha != 255 yet")
tex.draw_sized(size=(width, height))

Expected behavior:

  1. The angle check uses the angle argument
  2. The alpha check uses the alpha argument

Metadata

Metadata

Assignees

No one assigned

    Labels

    guiRelated to arcade GUI (sub module arcade.gui)

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions