NovaSVG 0.10.0
A header-only SVG library
Loading...
Searching...
No Matches
blend.h File Reference
#include "private.h"
#include "utils.h"
#include <assert.h>
#include <limits.h>
Include dependency graph for blend.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  novasvg::render::gradient_data_t
 
struct  novasvg::render::texture_data_t
 
struct  novasvg::render::linear_gradient_values_t
 
struct  novasvg::render::radial_gradient_values_t
 

Namespaces

namespace  novasvg
 Main namespace for the NovaSVG library.
 
namespace  novasvg::render
 

Macros

#define COLOR_TABLE_SIZE   1024
 
#define FIXPT_BITS   8
 
#define FIXPT_SIZE   (1 << FIXPT_BITS)
 
#define BUFFER_SIZE   1024
 
#define FIXED_SCALE   (1 << 16)
 
#define HALF_POINT   (1 << 15)
 

Typedefs

typedef void(* novasvg::render::composition_solid_function_t) (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
 
typedef void(* novasvg::render::composition_function_t) (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha)
 

Functions

NOVASVG_INLINE uint32_t novasvg::render::premultiply_color_with_opacity (const color_t *color, float opacity)
 
NOVASVG_INLINE uint32_t novasvg::render::INTERPOLATE_PIXEL_255 (uint32_t x, uint32_t a, uint32_t y, uint32_t b)
 
NOVASVG_INLINE uint32_t novasvg::render::INTERPOLATE_PIXEL_256 (uint32_t x, uint32_t a, uint32_t y, uint32_t b)
 
NOVASVG_INLINE uint32_t novasvg::render::BYTE_MUL (uint32_t x, uint32_t a)
 
NOVASVG_INLINE void novasvg::render::memfill32 (unsigned int *dest, int length, unsigned int value)
 
NOVASVG_INLINE int novasvg::render::gradient_clamp (const gradient_data_t *gradient, int ipos)
 
NOVASVG_INLINE uint32_t novasvg::render::gradient_pixel_fixed (const gradient_data_t *gradient, int fixed_pos)
 
NOVASVG_INLINE uint32_t novasvg::render::gradient_pixel (const gradient_data_t *gradient, float pos)
 
NOVASVG_INLINE void novasvg::render::fetch_linear_gradient (uint32_t *buffer, const linear_gradient_values_t *v, const gradient_data_t *gradient, int y, int x, int length)
 
NOVASVG_INLINE void novasvg::render::fetch_radial_gradient (uint32_t *buffer, const radial_gradient_values_t *v, const gradient_data_t *gradient, int y, int x, int length)
 
NOVASVG_INLINE void novasvg::render::composition_solid_clear (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_solid_source (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_solid_destination (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_solid_source_over (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_solid_destination_over (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_solid_source_in (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_solid_destination_in (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_solid_source_out (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_solid_destination_out (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_solid_source_atop (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_solid_destination_atop (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_solid_xor (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
 
NOVASVG_INLINE int novasvg::render::blend_mul255 (int x, int y)
 
template<operator_t Mode>
NOVASVG_INLINE int novasvg::render::blend_mode_channel (int cs, int cb, int as, int ab)
 
template<operator_t Mode>
NOVASVG_INLINE uint32_t novasvg::render::blend_mode_pixel (uint32_t dest, uint32_t src)
 
template<operator_t Mode>
NOVASVG_INLINE void novasvg::render::composition_blend_mode (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha)
 
template<operator_t Mode>
NOVASVG_INLINE void novasvg::render::composition_solid_blend_mode (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_clear (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_source (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_destination (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_source_over (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_destination_over (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_source_in (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_destination_in (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_source_out (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_destination_out (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_source_atop (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_destination_atop (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::composition_xor (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha)
 
NOVASVG_INLINE void novasvg::render::blend_solid (surface_t *surface, operator_t op, uint32_t solid, const span_buffer_t *span_buffer)
 
NOVASVG_INLINE void novasvg::render::blend_linear_gradient (surface_t *surface, operator_t op, const gradient_data_t *gradient, const span_buffer_t *span_buffer)
 
NOVASVG_INLINE void novasvg::render::blend_radial_gradient (surface_t *surface, operator_t op, const gradient_data_t *gradient, const span_buffer_t *span_buffer)
 
NOVASVG_INLINE void novasvg::render::blend_untransformed_argb (surface_t *surface, operator_t op, const texture_data_t *texture, const span_buffer_t *span_buffer)
 
NOVASVG_INLINE void novasvg::render::blend_transformed_argb (surface_t *surface, operator_t op, const texture_data_t *texture, const span_buffer_t *span_buffer)
 
NOVASVG_INLINE void novasvg::render::blend_untransformed_tiled_argb (surface_t *surface, operator_t op, const texture_data_t *texture, const span_buffer_t *span_buffer)
 
NOVASVG_INLINE void novasvg::render::blend_transformed_tiled_argb (surface_t *surface, operator_t op, const texture_data_t *texture, const span_buffer_t *span_buffer)
 
NOVASVG_INLINE uint32_t novasvg::render::interpolate_4_pixels (uint32_t tl, uint32_t tr, uint32_t bl, uint32_t br, uint32_t distx, uint32_t disty)
 
NOVASVG_INLINE void novasvg::render::blend_transformed_bilinear_tiled_argb (surface_t *surface, operator_t op, const texture_data_t *texture, const span_buffer_t *span_buffer)
 
NOVASVG_INLINE void novasvg::render::blend_color (canvas_t *canvas, const color_t *color, const span_buffer_t *span_buffer)
 
NOVASVG_INLINE void novasvg::render::blend_gradient (canvas_t *canvas, const gradient_paint_t *gradient, const span_buffer_t *span_buffer)
 
NOVASVG_INLINE void novasvg::render::blend_texture (canvas_t *canvas, const texture_paint_t *texture, const span_buffer_t *span_buffer)
 
NOVASVG_INLINE void novasvg::render::blend (canvas_t *canvas, const span_buffer_t *span_buffer)
 

Variables

NOVASVG_INLINE const composition_solid_function_t novasvg::render::composition_solid_table []
 
NOVASVG_INLINE const composition_function_t novasvg::render::composition_table []
 

Macro Definition Documentation

◆ BUFFER_SIZE

#define BUFFER_SIZE   1024

Definition at line 755 of file blend.h.

◆ COLOR_TABLE_SIZE

#define COLOR_TABLE_SIZE   1024

Definition at line 12 of file blend.h.

◆ FIXED_SCALE

#define FIXED_SCALE   (1 << 16)

Definition at line 859 of file blend.h.

◆ FIXPT_BITS

#define FIXPT_BITS   8

Definition at line 194 of file blend.h.

◆ FIXPT_SIZE

#define FIXPT_SIZE   (1 << FIXPT_BITS)

Definition at line 195 of file blend.h.

◆ HALF_POINT

#define HALF_POINT   (1 << 15)

Definition at line 1026 of file blend.h.