Skip to content

Commit

Permalink
rename 'ps_matrix_reset' to 'ps_matrix_identity'
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjipeng committed Jul 8, 2024
1 parent 14478e0 commit 4b249ba
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion demos/tiger.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ void on_draw(ps_context* gc)
ps_set_composite_operator(gc, COMPOSITE_SRC);

ps_identity(gc);
ps_matrix_reset(matrix);
ps_matrix_identity(matrix);
ps_matrix_translate(matrix, tx, ty);
ps_matrix_translate(matrix, 0.5f*(width-tigerMaxX*scale), -(float)height/12.0f);
ps_matrix_scale(matrix, scale, scale);
Expand Down
10 changes: 5 additions & 5 deletions include/picasso.h
Original file line number Diff line number Diff line change
Expand Up @@ -2691,27 +2691,27 @@ PEXPORT void PICAPI ps_matrix_shear(ps_matrix* matrix, float shx, float shy);
*
* \param matrix Pointer to an existing matrix object.
*
* \sa ps_matrix_flip_x, ps_matrix_flip_y, ps_matrix_reset
* \sa ps_matrix_flip_x, ps_matrix_flip_y, ps_matrix_identity
*/
PEXPORT void PICAPI ps_matrix_invert(ps_matrix* matrix);

/**
* \fn void ps_matrix_reset(ps_matrix* matrix)
* \fn void ps_matrix_identity(ps_matrix* matrix)
* \brief Reset a matrix to identity matrix.
*
* \param matrix Pointer to an existing matrix object.
*
* \sa ps_matrix_flip_x, ps_matrix_flip_y, ps_matrix_invert
*/
PEXPORT void PICAPI ps_matrix_reset(ps_matrix* matrix);
PEXPORT void PICAPI ps_matrix_identity(ps_matrix* matrix);

/**
* \fn void ps_matrix_flip_x(ps_matrix* matrix)
* \brief Flip a matrix in the horizontal direction.
*
* \param matrix Pointer to an existing matrix object.
*
* \sa ps_matrix_reset, ps_matrix_flip_y, ps_matrix_invert
* \sa ps_matrix_identity, ps_matrix_flip_y, ps_matrix_invert
*/
PEXPORT void PICAPI ps_matrix_flip_x(ps_matrix* matrix);

Expand All @@ -2721,7 +2721,7 @@ PEXPORT void PICAPI ps_matrix_flip_x(ps_matrix* matrix);
*
* \param matrix Pointer to an existing matrix object.
*
* \sa ps_matrix_reset, ps_matrix_flip_x, ps_matrix_invert
* \sa ps_matrix_identity, ps_matrix_flip_x, ps_matrix_invert
*/
PEXPORT void PICAPI ps_matrix_flip_y(ps_matrix* matrix);

Expand Down
2 changes: 1 addition & 1 deletion src/picasso.def
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ EXPORTS
ps_matrix_rotate
ps_matrix_shear
ps_matrix_invert
ps_matrix_reset
ps_matrix_identity
ps_matrix_flip_x
ps_matrix_flip_y
ps_matrix_multiply
Expand Down
2 changes: 1 addition & 1 deletion src/picasso_matrix_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ void PICAPI ps_matrix_flip_y(ps_matrix* matrix)
global_status = STATUS_SUCCEED;
}

void PICAPI ps_matrix_reset(ps_matrix* matrix)
void PICAPI ps_matrix_identity(ps_matrix* matrix)
{
if (!picasso::is_valid_system_device()) {
global_status = STATUS_DEVICE_ERROR;
Expand Down
2 changes: 1 addition & 1 deletion wasm/export.list
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
_ps_matrix_rotate
_ps_matrix_shear
_ps_matrix_invert
_ps_matrix_reset
_ps_matrix_identity
_ps_matrix_flip_x
_ps_matrix_flip_y
_ps_matrix_multiply
Expand Down
4 changes: 2 additions & 2 deletions wasm/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ class Matrix2D {
this._ps_matrix_invert = _getExportWrapper(instance, 'ps_matrix_invert'); // USE
this._ps_matrix_flip_x = _getExportWrapper(instance, 'ps_matrix_flip_x'); // USE
this._ps_matrix_flip_y = _getExportWrapper(instance, 'ps_matrix_flip_y'); //USE
this._ps_matrix_reset = _getExportWrapper(instance, 'ps_matrix_reset'); // USE
this._ps_matrix_identity = _getExportWrapper(instance, 'ps_matrix_identity'); // USE
this._ps_matrix_multiply= _getExportWrapper(instance, 'ps_matrix_multiply'); // USE
this._ps_matrix_is_equal = _getExportWrapper(instance, 'ps_matrix_is_equal'); // USE
this._ps_matrix_is_identity = _getExportWrapper(instance, 'ps_matrix_is_identity'); // USE
Expand Down Expand Up @@ -470,7 +470,7 @@ class Matrix2D {
}

identity() {
this._ps_matrix_reset(this._data);
this._ps_matrix_identity(this._data);
}

multiply(m) {
Expand Down
Binary file modified wasm/picasso.wasm
Binary file not shown.

0 comments on commit 4b249ba

Please sign in to comment.