#include "image.h"
#include "buffer.h"
#include "gfxbuf.h"
◆ _wlmtk_image_create_wlr_buffer_from_image()
struct wlr_buffer * _wlmtk_image_create_wlr_buffer_from_image |
( |
const char * | path_ptr, |
|
|
int | width, |
|
|
int | height ) |
Creates a wlr_buffer that holds the image loaded from path, at that image's size.
- Parameters
-
path_ptr | |
width | Desired width of the image. 0 0r negative to use the image's native width. |
height | Desired height of the image. 0 0r negative to use the image's native height. |
- Returns
- the wlr_buffer or NULL on error.
◆ _wlmtk_image_element_destroy()
◆ test_create_destroy()
void test_create_destroy |
( |
bs_test_t * | test_ptr | ) |
|
|
static |
◆ wlmtk_image_create()
Creates a toolkit image: An element showing the image.
- Parameters
-
- Returns
- Pointer to the toolkit image, or NULL on error.
◆ wlmtk_image_create_scaled()
Creates a toolkit image, scaled while preserving aspect ratio.
- Parameters
-
image_path_ptr | |
width | |
height | |
env_ptr | |
- Returns
- Pointer to the toolkit image or NULL on error.
◆ wlmtk_image_destroy()
Destroys the toolkit image.
- Parameters
-
◆ wlmtk_image_element()
◆ _wlmtk_image_element_vmt
Initial value:= {
}
static void _wlmtk_image_element_destroy(wlmtk_element_t *element_ptr)
Definition image.c:162
The imag'es virtual method table for wlmtk_element_t superclass.
◆ wlmtk_image_test_cases
const bs_test_case_t wlmtk_image_test_cases[] |
Initial value:= {
{ 0, NULL, NULL }
}
static void test_create_destroy(bs_test_t *test_ptr)
Definition image.c:179
Unit test cases.