61 lines
1.5 KiB
C
61 lines
1.5 KiB
C
/*
|
|
* This software is licensed under the terms of the MIT-License
|
|
* See COPYING for further information.
|
|
* ---
|
|
* Copyright (c) 2011-2019, Lukas Weber <laochailan@web.de>.
|
|
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@alienslab.net>.
|
|
*/
|
|
|
|
#ifndef IGUARD_util_graphics_h
|
|
#define IGUARD_util_graphics_h
|
|
|
|
#include "taisei.h"
|
|
|
|
#include "fbpair.h"
|
|
#include "resource/font.h"
|
|
|
|
void set_ortho(float w, float h);
|
|
void colorfill(float r, float g, float b, float a);
|
|
void fade_out(float f);
|
|
|
|
typedef struct DrawFragmentsParams {
|
|
Sprite *fill;
|
|
|
|
struct {
|
|
const Color *fill;
|
|
const Color *back;
|
|
const Color *frag;
|
|
} color;
|
|
|
|
struct {
|
|
float x, y;
|
|
} pos;
|
|
|
|
struct {
|
|
float x, y;
|
|
} origin_offset;
|
|
|
|
struct {
|
|
int elements;
|
|
int fragments;
|
|
} limits;
|
|
|
|
struct {
|
|
int elements;
|
|
int fragments;
|
|
} filled;
|
|
|
|
float alpha;
|
|
float spacing;
|
|
} DrawFragmentsParams;
|
|
|
|
void draw_fragments(const DrawFragmentsParams *params);
|
|
double draw_fraction(double value, Alignment a, double pos_x, double pos_y, Font *f_int, Font *f_fract, const Color *c_int, const Color *c_fract, bool zero_pad);
|
|
void draw_framebuffer_tex(Framebuffer *fb, double width, double height);
|
|
void draw_framebuffer_attachment(Framebuffer *fb, double width, double height, FramebufferAttachment attachment);
|
|
|
|
void fbutil_create_attachments(Framebuffer *fb, uint num_attachments, FBAttachmentConfig attachments[num_attachments]);
|
|
void fbutil_destroy_attachments(Framebuffer *fb);
|
|
void fbutil_resize_attachment(Framebuffer *fb, FramebufferAttachment attachment, uint width, uint height);
|
|
|
|
#endif // IGUARD_util_graphics_h
|