render: implement coordinate-based anchor positioning
Not to be confused with Minecraft coordinates. Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ifdb90fc92a1565ba1d30b85c91d6e1ab6a6a6964
This commit is contained in:
parent
b6780cc180
commit
dadba853e8
4 changed files with 168 additions and 85 deletions
8
include/chroma.h
vendored
8
include/chroma.h
vendored
|
|
@ -104,6 +104,8 @@ typedef struct {
|
|||
chroma_scale_mode_t scale_mode;
|
||||
chroma_filter_quality_t filter_quality;
|
||||
chroma_anchor_t anchor;
|
||||
float anchor_x; // custom X offset (0-100, 50=center)
|
||||
float anchor_y; // custom Y offset (0-100, 50=center)
|
||||
bool config_loaded;
|
||||
|
||||
// OpenGL resource cache
|
||||
|
|
@ -123,6 +125,8 @@ typedef struct {
|
|||
chroma_scale_mode_t scale_mode;
|
||||
chroma_filter_quality_t filter_quality;
|
||||
chroma_anchor_t anchor;
|
||||
float anchor_x; // custom X offset (0-100, 50=center, 0=left, 100=right)
|
||||
float anchor_y; // custom Y offset (0-100, 50=center, 0=top, 100=bottom)
|
||||
} chroma_config_mapping_t;
|
||||
|
||||
// Application configuration
|
||||
|
|
@ -136,6 +140,8 @@ typedef struct {
|
|||
chroma_scale_mode_t default_scale_mode;
|
||||
chroma_filter_quality_t default_filter_quality;
|
||||
chroma_anchor_t default_anchor;
|
||||
float default_anchor_x; // custom anchor X offset (0-100, 50=center)
|
||||
float default_anchor_y; // custom anchor Y offset (0-100, 50=center)
|
||||
|
||||
// Image downsampling settings
|
||||
bool enable_downsampling; // enable automatic downsampling
|
||||
|
|
@ -248,7 +254,7 @@ const char *chroma_config_get_image_for_output(chroma_config_t *config,
|
|||
int chroma_config_get_mapping_for_output(
|
||||
chroma_config_t *config, const char *output_name,
|
||||
chroma_scale_mode_t *scale_mode, chroma_filter_quality_t *filter_quality,
|
||||
chroma_anchor_t *anchor);
|
||||
chroma_anchor_t *anchor, float *anchor_x, float *anchor_y);
|
||||
|
||||
void chroma_config_print(const chroma_config_t *config);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue