Go to the documentation of this file. 1 #ifndef MYPAINTTILEDSURFACE_H
2 #define MYPAINTTILEDSURFACE_H
292 float center_x,
float center_y,
293 float symmetry_angle,
295 int rot_symmetry_lines);
299 #endif // MYPAINTTILEDSURFACE_H
MyPaintSurface parent
Surface interface.
Definition: mypaint-tiled-surface.h:77
void(* MyPaintTileRequestEndFunction2)(MyPaintTiledSurface2 *self, MyPaintTileRequest *request)
Functionally equivalent to MyPaintTileRequestEndFunction.
Definition: mypaint-tiled-surface.h:194
gboolean threadsafe_tile_requests
Whether tile requests shuold be considered thread-safe or not.
Definition: mypaint-tiled-surface.h:215
int tile_size
Definition: mypaint-tiled-surface.h:216
void mypaint_tiled_surface2_tile_request_start(MyPaintTiledSurface2 *self, MyPaintTileRequest *request)
Finalize any pending dab operations and set the resulting invalidation rectangles.
MyPaintRectangle * bboxes
Pointer to an array of invalidation rectangles.
Definition: mypaint-tiled-surface.h:230
gint gboolean
Definition: mypaint-glib-compat.h:25
int num_bboxes_dirtied
The number of bboxes that have been modified since they were last reset.
Definition: mypaint-tiled-surface.h:225
void mypaint_tiled_surface2_tile_request_end(MyPaintTiledSurface2 *self, MyPaintTileRequest *request)
Finalize any pending dab operations and set the resulting invalidation rectangles.
void mypaint_tiled_surface_init(MyPaintTiledSurface *self, MyPaintTileRequestStartFunction tile_request_start, MyPaintTileRequestEndFunction tile_request_end)
Initialize the surface by providing the tile request implementations.
void mypaint_tiled_surface2_end_atomic(MyPaintTiledSurface2 *self, MyPaintRectangles *roi)
Finalize any pending dab operations and set the resulting invalidation rectangles.
Abstract surface type for the MyPaint brush engine.
Definition: mypaint-surface.h:131
Representation of a rectangle, integer values: (x, y, w, h)
Definition: mypaint-rectangle.h:33
struct OperationQueue * operation_queue
Per-tile queue of pending dab operations.
Definition: mypaint-tiled-surface.h:88
MyPaintTileRequestEndFunction2 tile_request_end
See MyPaintTileRequestEndFunction2.
Definition: mypaint-tiled-surface.h:211
int tx
The x-coordinate of the requested tile.
Definition: mypaint-tiled-surface.h:24
MyPaintSurface2 parent
Parent interface.
Definition: mypaint-tiled-surface.h:207
void mypaint_tiled_surface_end_atomic(MyPaintTiledSurface *self, MyPaintRectangle *roi)
MyPaintSymmetryData symmetry_data
The symmetry data used.
Definition: mypaint-tiled-surface.h:221
int ty
The y-coordinate of the requested tile.
Definition: mypaint-tiled-surface.h:26
Contains data used for symmetry calculations.
Definition: mypaint-symmetry.h:99
int mipmap_level
The mipmap level for which to fetch the tile __(unused)__.
Definition: mypaint-tiled-surface.h:36
Extends MyPaintSurface with support for spectral ops and multiple bounding boxes.
Definition: mypaint-surface.h:321
gboolean threadsafe_tile_requests
Whether tile requests shuold be considered thread-safe or not.
Definition: mypaint-tiled-surface.h:95
void mypaint_tiled_surface_tile_request_end(MyPaintTiledSurface *self, MyPaintTileRequest *request)
Put a (potentially modified) tile back into the underlying tile store.
Tile-backed implementation of MyPaintSurface.
Definition: mypaint-tiled-surface.h:75
int thread_id
Identifier of the thread from which the request is made.
Definition: mypaint-tiled-surface.h:34
float mypaint_tiled_surface_get_alpha(MyPaintTiledSurface *self, float x, float y, float radius)
Get the average alpha value of pixels covered by a standard dab.
gboolean readonly
Whether the tile data should be considered read-only.
Definition: mypaint-tiled-surface.h:28
MyPaintTileRequestEndFunction tile_request_end
See MyPaintTileRequestEndFunction.
Definition: mypaint-tiled-surface.h:82
unsigned short guint16
Definition: mypaint-glib-compat.h:28
void mypaint_tiled_surface_tile_request_start(MyPaintTiledSurface *self, MyPaintTileRequest *request)
Fetch a tile out from the underlying tile store.
float surface_center_x
The x-coordinate of the vertical symmetry line.
Definition: mypaint-tiled-surface.h:86
void mypaint_tiled_surface_begin_atomic(MyPaintTiledSurface *self)
Implementation of MyPaintSurface::begin_atomic Note: Only intended to be used from MyPaintTiledSurfac...
guint16 * buffer
Pointer to the tile buffer, set by receiver of the request.
Definition: mypaint-tiled-surface.h:30
Tile-backed implementation of MyPaintSurface2.
Definition: mypaint-tiled-surface.h:205
MyPaintTileRequestStartFunction2 tile_request_start
See MyPaintTileRequestStartFunction2.
Definition: mypaint-tiled-surface.h:209
struct OperationQueue * operation_queue
Per-tile queue of pending dab operations.
Definition: mypaint-tiled-surface.h:213
void mypaint_tiled_surface2_set_symmetry_state(MyPaintTiledSurface2 *self, gboolean active, float center_x, float center_y, float symmetry_angle, MyPaintSymmetryType symmetry_type, int rot_symmetry_lines)
Set new symmetry_data values and mark it for update.
void mypaint_tiled_surface_set_symmetry_state(MyPaintTiledSurface *self, gboolean active, float center_x)
Set the symmetry state of the surface.
void(* MyPaintTileRequestEndFunction)(MyPaintTiledSurface *self, MyPaintTileRequest *request)
Function for ending a tile request from the surface backend.
Definition: mypaint-tiled-surface.h:62
void * gpointer
Definition: mypaint-glib-compat.h:20
int num_bboxes
Length of bboxes.
Definition: mypaint-tiled-surface.h:223
Holds the size and location of a MyPaintRectangle array.
Definition: mypaint-rectangle.h:51
void mypaint_tiled_surface2_begin_atomic(MyPaintTiledSurface2 *self)
Prepare the surface for handling a set of dab operations.
#define G_END_DECLS
Definition: mypaint-glib-compat.h:14
void(* MyPaintTileRequestStartFunction)(MyPaintTiledSurface *self, MyPaintTileRequest *request)
Function for beginning a tile request from the surface backend.
Definition: mypaint-tiled-surface.h:54
int tile_size
The side length of the (square) tiles.
Definition: mypaint-tiled-surface.h:97
MyPaintTileRequestStartFunction tile_request_start
See MyPaintTileRequestStartFunction.
Definition: mypaint-tiled-surface.h:80
void mypaint_tile_request_init(MyPaintTileRequest *data, int level, int tx, int ty, gboolean readonly)
Initiatilze a tile request.
MyPaintRectangle dirty_bbox
Invalidation rectangle recording areas changed between the calls to parent's MyPaintSurface::begin_at...
Definition: mypaint-tiled-surface.h:93
MyPaintSymmetryType
Enumeration of different kinds of symmetry.
Definition: mypaint-symmetry.h:27
Tile request used by MyPaintTiledSurface and MyPaintTiledSurface2.
Definition: mypaint-tiled-surface.h:22
gboolean surface_do_symmetry
Whether vertical-line symmetry is enabled or not.
Definition: mypaint-tiled-surface.h:84
#define G_BEGIN_DECLS
Definition: mypaint-glib-compat.h:13
void mypaint_tiled_surface_destroy(MyPaintTiledSurface *self)
Free the resources used by the surface, and the surface itself.
void mypaint_tiled_surface2_destroy(MyPaintTiledSurface2 *self)
Deallocate all resources used by the surface struct, and the struct itself.
void mypaint_tiled_surface2_init(MyPaintTiledSurface2 *self, MyPaintTileRequestStartFunction2 tile_request_start, MyPaintTileRequestEndFunction2 tile_request_end)
Initialize the surface by providing the tile request implementations.
void(* MyPaintTileRequestStartFunction2)(MyPaintTiledSurface2 *self, MyPaintTileRequest *request)
Functionally equivalent to MyPaintTileRequestStartFunction.
Definition: mypaint-tiled-surface.h:190
gpointer context
Additional data to be used by surface implementations __(unused)__.
Definition: mypaint-tiled-surface.h:32