mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
Support ImageExtended
This commit is contained in:
parent
4f1ee0e828
commit
a8755bd92f
|
@ -217,7 +217,7 @@ Hold %s to displace the shape's origin""",
|
|||
"Text",
|
||||
"text",
|
||||
"res://src/Tools/UtilityTools/Text.tscn",
|
||||
[Global.LayerTypes.PIXEL],
|
||||
[Global.LayerTypes.PIXEL, Global.LayerTypes.TILEMAP],
|
||||
""
|
||||
),
|
||||
"3DShapeEdit":
|
||||
|
|
|
@ -10,7 +10,7 @@ var indices_x: int
|
|||
var indices_y: int
|
||||
|
||||
|
||||
func _init(_tileset: TileSetCustom, _image := Image.new(), _opacity := 1.0) -> void:
|
||||
func _init(_tileset: TileSetCustom, _image: ImageExtended, _opacity := 1.0) -> void:
|
||||
super._init(_image, _opacity)
|
||||
tileset = _tileset
|
||||
indices_x = ceili(float(get_image().get_width()) / tileset.tile_size.x)
|
||||
|
|
|
@ -17,5 +17,9 @@ func get_layer_type() -> int:
|
|||
|
||||
|
||||
func new_empty_cel() -> BaseCel:
|
||||
var image := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
|
||||
var format := project.get_image_format()
|
||||
var is_indexed := project.is_indexed()
|
||||
var image := ImageExtended.create_custom(
|
||||
project.size.x, project.size.y, false, format, is_indexed
|
||||
)
|
||||
return CelTileMap.new(tileset, image)
|
||||
|
|
Loading…
Reference in a new issue