wlmaker
|
#include "image.h"
#include <cairo.h>
#include <libbase/libbase.h>
#include <stdbool.h>
#include <stdlib.h>
#include "buffer.h"
#include "gfxbuf.h"
Classes | |
struct | _wlmtk_image_t |
Functions | |
struct wlr_buffer * | _wlmtk_image_create_wlr_buffer_from_image (const char *path_ptr, int width, int height) |
static void | _wlmtk_image_element_destroy (wlmtk_element_t *element_ptr) |
wlmtk_image_t * | wlmtk_image_create (const char *image_path_ptr) |
wlmtk_image_t * | wlmtk_image_create_scaled (const char *image_path_ptr, int width, int height) |
void | wlmtk_image_destroy (wlmtk_image_t *image_ptr) |
wlmtk_element_t * | wlmtk_image_element (wlmtk_image_t *image_ptr) |
static void | test_create_destroy (bs_test_t *test_ptr) |
Variables | |
static const wlmtk_element_vmt_t | _wlmtk_image_element_vmt |
const bs_test_case_t | wlmtk_image_test_cases [] |
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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.
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. |
|
static |
Implements wlmtk_element_vmt_t::destroy – virtual dtor.
|
static |
Exercises ctor and dtor.
wlmtk_image_t * wlmtk_image_create | ( | const char * | image_path_ptr | ) |
Creates a toolkit image: An element showing the image.
image_path_ptr |
wlmtk_image_t * wlmtk_image_create_scaled | ( | const char * | image_path_ptr, |
int | width, | ||
int | height | ||
) |
Creates a toolkit image, scaled while preserving aspect ratio.
image_path_ptr | |
width | |
height |
void wlmtk_image_destroy | ( | wlmtk_image_t * | image_ptr | ) |
Destroys the toolkit image.
image_ptr |
wlmtk_element_t * wlmtk_image_element | ( | wlmtk_image_t * | image_ptr | ) |
image_ptr
.
|
static |
The imag'es virtual method table for wlmtk_element_t superclass.
const bs_test_case_t wlmtk_image_test_cases[] |
Unit test cases.