MeshLib C Docs
Loading...
Searching...
No Matches
MRImage.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRColor.h>
4#include <MRCMesh/MRMeshFwd.h>
5#include <MRCMesh/MRVector2.h>
6#include <MRCMisc/common.h>
7#include <MRCMisc/exports.h>
8
9#include <stddef.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15typedef struct MR_MeshTexture MR_MeshTexture; // Defined in `#include <MRCMesh/MRMeshTexture.h>`.
16typedef struct MR_Vector2f MR_Vector2f; // Defined in `#include <MRCMesh/MRVector2.h>`.
17typedef struct MR_std_vector_MR_Color MR_std_vector_MR_Color; // Defined in `#include <MRCMisc/std_vector_MR_Color.h>`.
18
19
25typedef struct MR_Image MR_Image;
26
31
35
40
45
49
54
58
63
67
69MRC_API const MR_Image *MR_Image_OffsetPtr(const MR_Image *ptr, ptrdiff_t i);
70
73
78
82
86
89
92
97
104
109
114
121
128
135
136#ifdef __cplusplus
137} // extern "C"
138#endif
struct MR_std_vector_MR_Color MR_std_vector_MR_Color
Definition MRHeapBytes.h:15
MRC_API MR_Image * MR_Image_DefaultConstruct(void)
MRC_API MR_MeshTexture * MR_Image_MutableStaticDowncastTo_MR_MeshTexture(MR_Image *object)
MRC_API MR_Image * MR_Image_DefaultConstructArray(size_t num_elems)
MRC_API void MR_Image_Set_resolution(MR_Image *_this, MR_Vector2i value)
MRC_API MR_uint64_t MR_Image_heapBytes(const MR_Image *_this)
MRC_API const MR_std_vector_MR_Color * MR_Image_Get_pixels(const MR_Image *_this)
MRC_API MR_Image * MR_Image_OffsetMutablePtr(MR_Image *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_std_vector_MR_Color * MR_Image_GetMutable_pixels(MR_Image *_this)
MRC_API const MR_Vector2i * MR_Image_Get_resolution(const MR_Image *_this)
MRC_API MR_Vector2i * MR_Image_GetMutable_resolution(MR_Image *_this)
MRC_API MR_Color MR_Image_sampleDiscrete(const MR_Image *_this, const MR_Vector2f *pos)
MRC_API MR_Color MR_Image_sampleBilinear(const MR_Image *_this, const MR_Vector2f *pos)
MRC_API MR_Image * MR_Image_ConstructFromAnother(MR_PassBy _other_pass_by, MR_Image *_other)
MRC_API void MR_Image_DestroyArray(const MR_Image *_this)
Destroys a heap-allocated array of MR_Image. Does nothing if the pointer is null.
MRC_API void MR_Image_Set_pixels(MR_Image *_this, MR_PassBy value_pass_by, MR_std_vector_MR_Color *value)
MRC_API const MR_Image * MR_Image_OffsetPtr(const MR_Image *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_Image * MR_Image_ConstructFrom(MR_PassBy pixels_pass_by, MR_std_vector_MR_Color *pixels, MR_Vector2i resolution)
MRC_API MR_Image * MR_Image_AssignFromAnother(MR_Image *_this, MR_PassBy _other_pass_by, MR_Image *_other)
struct MR_MeshTexture MR_MeshTexture
Definition MRImage.h:15
MRC_API MR_Color MR_Image_sample(const MR_Image *_this, MR_FilterType filter, const MR_Vector2f *pos)
MRC_API const MR_MeshTexture * MR_Image_StaticDowncastTo_MR_MeshTexture(const MR_Image *object)
MRC_API MR_Color MR_Image_index_const(const MR_Image *_this, const MR_Vector2i *p)
MRC_API void MR_Image_Destroy(const MR_Image *_this)
Destroys a heap-allocated instance of MR_Image. Does nothing if the pointer is null.
MRC_API MR_Color * MR_Image_index(MR_Image *_this, const MR_Vector2i *p)
struct MR_Image MR_Image
Definition MRJpeg.h:10
char MR_FilterType
Definition MRMeshFwd.h:15
MR_PassBy
Definition common.h:19
uint64_t MR_uint64_t
Definition common.h:14
#define MRC_API
Definition exports.h:11
Generated from class MR::Color.
Definition MRColor.h:19
Definition MRVector2.h:44
Definition MRVector2.h:28