Loading...
Searching...
No Matches
MyPaintTiledSurface2 Struct Reference

Tile-backed implementation of MyPaintSurface2. More...

`#include <mypaint-tiled-surface.h>`

## Public Types

typedef void(* | MyPaintTileRequestStartFunction2) (MyPaintTiledSurface2 *self, MyPaintTileRequest *request)
| Functionally equivalent to #MyPaintTileRequestStartFunction.
typedef void(* | MyPaintTileRequestEndFunction2) (MyPaintTiledSurface2 *self, MyPaintTileRequest *request)
| Functionally equivalent to #MyPaintTileRequestEndFunction.

## Public Member Functions

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 | mypaint_tiled_surface2_begin_atomic (MyPaintTiledSurface2 *self)
| Prepare the surface for handling a set of dab operations.
void | mypaint_tiled_surface2_end_atomic (MyPaintTiledSurface2 *self, MyPaintRectangles *roi)
| Finalize any pending dab operations and set the resulting invalidation rectangles.
void | mypaint_tiled_surface2_tile_request_start (MyPaintTiledSurface2 *self, MyPaintTileRequest *request)
| Finalize any pending dab operations and set the resulting invalidation rectangles.
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_surface2_destroy (MyPaintTiledSurface2 *self)
| Deallocate all resources used by the surface struct, and the struct itself.
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.

## Data Fields

MyPaintSurface2 | parent
| Parent interface.
MyPaintTileRequestStartFunction2 | tile_request_start
| See MyPaintTileRequestStartFunction2.
MyPaintTileRequestEndFunction2 | tile_request_end
| See MyPaintTileRequestEndFunction2.
struct OperationQueue * | operation_queue
| Per-tile queue of pending dab operations.
gboolean | threadsafe_tile_requests
| Whether tile requests shuold be considered thread-safe or not.
int | tile_size
MyPaintSymmetryData | symmetry_data
| The symmetry data used.
int | num_bboxes
| Length of bboxes.
int | num_bboxes_dirtied
| The number of bboxes that have been modified since they were last reset.
MyPaintRectangle * | bboxes
| Pointer to an array of invalidation rectangles.

## Detailed Description

Tile-backed implementation of MyPaintSurface2.

Apart from the additional calls of MyPaintSurface2, this implementation supports additional symmetry types, and the ability to adjust the symmetry angle - it is otherwise identical to MyPaintTiledSurface.

See also
  MyPaintTiledSurface

## Member Typedef Documentation

## MyPaintTileRequestEndFunction2

typedef void(* MyPaintTileRequestEndFunction2) (MyPaintTiledSurface2 *self, MyPaintTileRequest *request)

Functionally equivalent to #MyPaintTileRequestEndFunction.

## MyPaintTileRequestStartFunction2

typedef void(* MyPaintTileRequestStartFunction2) (MyPaintTiledSurface2 *self, MyPaintTileRequest *request)

Functionally equivalent to #MyPaintTileRequestStartFunction.

## Member Function Documentation

## mypaint_tiled_surface2_begin_atomic()

void mypaint_tiled_surface2_begin_atomic | ( | MyPaintTiledSurface2 * | self | ) |

Prepare the surface for handling a set of dab operations.

## mypaint_tiled_surface2_destroy()

void mypaint_tiled_surface2_destroy | ( | MyPaintTiledSurface2 * | self | ) |

Deallocate all resources used by the surface struct, and the struct itself.

## mypaint_tiled_surface2_end_atomic()

void mypaint_tiled_surface2_end_atomic | ( | MyPaintTiledSurface2 * | self,
|  | MyPaintRectangles * | roi )

Finalize any pending dab operations and set the resulting invalidation rectangles.

## mypaint_tiled_surface2_init()

void mypaint_tiled_surface2_init | ( | MyPaintTiledSurface2 * | self,
|  | MyPaintTileRequestStartFunction2 | tile_request_start,
|  | MyPaintTileRequestEndFunction2 | tile_request_end )

Initialize the surface by providing the tile request implementations.

Allocates the resources necessary for the surface to function.

See also
  mypaint_tiled_surface2_destroy

## mypaint_tiled_surface2_set_symmetry_state()

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.

See also
  MyPaintSymmetryData, MyPaintSymmetryState

## mypaint_tiled_surface2_tile_request_end()

void mypaint_tiled_surface2_tile_request_end | ( | MyPaintTiledSurface2 * | self,
|  | MyPaintTileRequest * | request )

Finalize any pending dab operations and set the resulting invalidation rectangles.

## mypaint_tiled_surface2_tile_request_start()

void mypaint_tiled_surface2_tile_request_start | ( | MyPaintTiledSurface2 * | self,
|  | MyPaintTileRequest * | request )

Finalize any pending dab operations and set the resulting invalidation rectangles.

## Field Documentation

## bboxes

MyPaintRectangle* MyPaintTiledSurface2::bboxes

Pointer to an array of invalidation rectangles.

Records multiple invalidation rectangles when symmetry is enabled.

## num_bboxes

int MyPaintTiledSurface2::num_bboxes

Length of bboxes.

## num_bboxes_dirtied

int MyPaintTiledSurface2::num_bboxes_dirtied

The number of bboxes that have been modified since they were last reset.

## operation_queue

struct OperationQueue* MyPaintTiledSurface2::operation_queue

Per-tile queue of pending dab operations.

## parent

MyPaintSurface2 MyPaintTiledSurface2::parent

Parent interface.

## symmetry_data

MyPaintSymmetryData MyPaintTiledSurface2::symmetry_data

The symmetry data used.

See MyPaintSymmetryData for details.

## threadsafe_tile_requests

gboolean MyPaintTiledSurface2::threadsafe_tile_requests

Whether tile requests shuold be considered thread-safe or not.

## tile_request_end

MyPaintTileRequestEndFunction2 MyPaintTiledSurface2::tile_request_end

See MyPaintTileRequestEndFunction2.

## tile_request_start

MyPaintTileRequestStartFunction2 MyPaintTiledSurface2::tile_request_start

See MyPaintTileRequestStartFunction2.

## tile_size

int MyPaintTiledSurface2::tile_size

The documentation for this struct was generated from the following file:

- mypaint-tiled-surface.h