Skip to content

Better alternative to FlxG.bitmap.whitePixel #3620

Description

@Geokureli

Continued from: #3619 (comment)

The expected usage of whitePixel for solid rectangular sprites is:

sprite.frame = FlxG.bitmap.whitePixel;
sprite.setGraphicSize(someWidth, someHeight);
sprite.color = someColor;

Setting the scale of the sprite won't work because whitePixel is actually 10x10, which is very misleading. I would like a new option that is actually 1 pixel perhaps just pixel

Would be nice if there was a single method to do this, similar to the ease of

sprite.makeGraphic(someWidth, someHeight, someColor);

I think in order to better convey what is actually going on in relation to makeGraphic, which has different use cases, we should make something like:

FlxG.bitmap.pixel.loadInto(sprite, someWidth, someHeight, someColor);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions