Merge pull request #72907 from akien-mga/doc-image-create
doc: Fix Image 'set_pixel' doc for use of 'create'
This commit is contained in:
commit
2572f6800a
2 changed files with 5 additions and 10 deletions
|
@ -141,8 +141,7 @@
|
|||
GD.PushError("Couldn't load the image.");
|
||||
}
|
||||
|
||||
var texture = new ImageTexture();
|
||||
texture.CreateFromImage(image);
|
||||
var texture = ImageTexture.CreateFromImage(image);
|
||||
|
||||
// Display the image in a TextureRect node.
|
||||
var textureRect = new TextureRect();
|
||||
|
|
|
@ -482,16 +482,14 @@
|
|||
[gdscript]
|
||||
var img_width = 10
|
||||
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.
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
int imgWidth = 10;
|
||||
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.
|
||||
[/csharp]
|
||||
|
@ -510,16 +508,14 @@
|
|||
[gdscript]
|
||||
var img_width = 10
|
||||
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.
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
int imgWidth = 10;
|
||||
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.
|
||||
[/csharp]
|
||||
|
|
Loading…
Reference in a new issue