2 * Copyright 2014 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 // EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL
9 // DO NOT USE -- FOR INTERNAL TESTING ONLY
11 #ifndef sk_matrix_DEFINED
12 #define sk_matrix_DEFINED
14 #include "include/c/sk_types.h"
16 SK_C_PLUS_PLUS_BEGIN_GUARD
18 /** Set the matrix to identity */
19 void sk_matrix_set_identity(sk_matrix_t*);
21 /** Set the matrix to translate by (tx, ty). */
22 void sk_matrix_set_translate(sk_matrix_t*, float tx, float ty);
24 Preconcats the matrix with the specified translation.
27 void sk_matrix_pre_translate(sk_matrix_t*, float tx, float ty);
29 Postconcats the matrix with the specified translation.
32 void sk_matrix_post_translate(sk_matrix_t*, float tx, float ty);
34 /** Set the matrix to scale by sx and sy. */
35 void sk_matrix_set_scale(sk_matrix_t*, float sx, float sy);
37 Preconcats the matrix with the specified scale.
40 void sk_matrix_pre_scale(sk_matrix_t*, float sx, float sy);
42 Postconcats the matrix with the specified scale.
45 void sk_matrix_post_scale(sk_matrix_t*, float sx, float sy);
47 SK_C_PLUS_PLUS_END_GUARD