|
@@ -482,16 +482,14 @@
|
|
[gdscript]
|
|
[gdscript]
|
|
var img_width = 10
|
|
var img_width = 10
|
|
var img_height = 5
|
|
var img_height = 5
|
|
- var img = Image.new()
|
|
|
|
- img.create(img_width, img_height, false, Image.FORMAT_RGBA8)
|
|
|
|
|
|
+ var img = Image.create(img_width, img_height, false, Image.FORMAT_RGBA8)
|
|
|
|
|
|
img.set_pixel(1, 2, Color.RED) # Sets the color at (1, 2) to red.
|
|
img.set_pixel(1, 2, Color.RED) # Sets the color at (1, 2) to red.
|
|
[/gdscript]
|
|
[/gdscript]
|
|
[csharp]
|
|
[csharp]
|
|
int imgWidth = 10;
|
|
int imgWidth = 10;
|
|
int imgHeight = 5;
|
|
int imgHeight = 5;
|
|
- var img = new Image();
|
|
|
|
- img.Create(imgWidth, imgHeight, false, Image.Format.Rgba8);
|
|
|
|
|
|
+ var img = Image.Create(imgWidth, imgHeight, false, Image.Format.Rgba8);
|
|
|
|
|
|
img.SetPixel(1, 2, Colors.Red); // Sets the color at (1, 2) to red.
|
|
img.SetPixel(1, 2, Colors.Red); // Sets the color at (1, 2) to red.
|
|
[/csharp]
|
|
[/csharp]
|
|
@@ -510,16 +508,14 @@
|
|
[gdscript]
|
|
[gdscript]
|
|
var img_width = 10
|
|
var img_width = 10
|
|
var img_height = 5
|
|
var img_height = 5
|
|
- var img = Image.new()
|
|
|
|
- img.create(img_width, img_height, false, Image.FORMAT_RGBA8)
|
|
|
|
|
|
+ var img = Image.create(img_width, img_height, false, Image.FORMAT_RGBA8)
|
|
|
|
|
|
img.set_pixelv(Vector2i(1, 2), Color.RED) # Sets the color at (1, 2) to red.
|
|
img.set_pixelv(Vector2i(1, 2), Color.RED) # Sets the color at (1, 2) to red.
|
|
[/gdscript]
|
|
[/gdscript]
|
|
[csharp]
|
|
[csharp]
|
|
int imgWidth = 10;
|
|
int imgWidth = 10;
|
|
int imgHeight = 5;
|
|
int imgHeight = 5;
|
|
- var img = new Image();
|
|
|
|
- img.Create(imgWidth, imgHeight, false, Image.Format.Rgba8);
|
|
|
|
|
|
+ var img = Image.Create(imgWidth, imgHeight, false, Image.Format.Rgba8);
|
|
|
|
|
|
img.SetPixelv(new Vector2I(1, 2), Colors.Red); // Sets the color at (1, 2) to red.
|
|
img.SetPixelv(new Vector2I(1, 2), Colors.Red); // Sets the color at (1, 2) to red.
|
|
[/csharp]
|
|
[/csharp]
|