@@ -316,11 +316,29 @@ class Image : public ::Image {
316
316
}
317
317
}
318
318
319
- GETTERSETTER (void *, Data, data)
320
- GETTERSETTER (int , Width, width)
321
- GETTERSETTER (int , Height, height)
322
- GETTERSETTER (int , Mipmaps, mipmaps)
323
- GETTERSETTER (int , Format, format)
319
+ GETTER (void *, Data, data)
320
+ GETTER (int , Width, width)
321
+ GETTER (int , Height, height)
322
+ GETTER (int , Mipmaps, mipmaps)
323
+ GETTER (int , Format, format)
324
+
325
+ /* *
326
+ * Set the width of the image canvas.
327
+ *
328
+ * @see ResizeCanvas
329
+ */
330
+ void SetWidth (int width, int offsetX = 0 , int offsetY = 0 , ::Color fill = {255 , 255 , 255 , 255 }) {
331
+ ResizeCanvas (width, height, offsetX, offsetY, fill);
332
+ }
333
+
334
+ /* *
335
+ * Set the height of the image canvas.
336
+ *
337
+ * @see ResizeCanvas
338
+ */
339
+ void SetHeight (int height, int offsetX = 0 , int offsetY = 0 , ::Color fill = {255 , 255 , 255 , 255 }) {
340
+ ResizeCanvas (width, height, offsetX, offsetY, fill);
341
+ }
324
342
325
343
/* *
326
344
* Retrieve the width and height of the image.
0 commit comments