Skip to content

Commit

Permalink
ADD uncolorizeH2dDrawable
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Dec 9, 2024
1 parent 0bda708 commit eecbdf8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dn/Col.hx
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,11 @@ abstract Col(Int) from Int to Int {
e.color.setColor( withAlpha(ratio) );
}

/** Apply color to a Drawable using its Vector color **/
public static inline function uncolorizeH2dDrawable(e:h2d.Drawable) {
e.color.setColor(0);
}

public inline function toTile(wid=1, hei=1, alpha=1.0) : h2d.Tile {
return h2d.Tile.fromColor(withoutAlpha(), wid, hei, alpha);
}
Expand Down

0 comments on commit eecbdf8

Please sign in to comment.