Changes on brushes memory management, in preparation for Issue 362
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1699 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
13
src/brush.h
13
src/brush.h
@@ -111,9 +111,16 @@ void Capture_brush_with_lasso(int vertices, short * points,short clear);
|
||||
|
||||
|
||||
///
|
||||
/// Changes the Brush size, discarding its previous content.
|
||||
/// @return 0 OK, 1 Failed
|
||||
byte Realloc_brush(word new_brush_width, word new_brush_height);
|
||||
/// Changes the Brush size.
|
||||
/// @return 0 on success, non-zero on failure (memory?).
|
||||
/// @param new_brush: Optionally, you can provide an already allocated new
|
||||
/// brush - otherwise, this function performs the allocation.
|
||||
/// @param old_brush: If the caller passes NULL, this function will free the old
|
||||
/// pixel data. If the caller provides the address of a (free) byte
|
||||
/// pointer, the function will make it point to the original pixel data,
|
||||
/// in this case it will be the caller's responsibility to free() it
|
||||
/// (after transferring pixels to Brush, usually).
|
||||
byte Realloc_brush(word new_brush_width, word new_brush_height, byte *new_brush, byte **old_brush);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user