1cb93a386Sopenharmony_ci/*
2cb93a386Sopenharmony_ci * Copyright 2014 Google Inc.
3cb93a386Sopenharmony_ci *
4cb93a386Sopenharmony_ci * Use of this source code is governed by a BSD-style license that can be
5cb93a386Sopenharmony_ci * found in the LICENSE file.
6cb93a386Sopenharmony_ci */
7cb93a386Sopenharmony_ci
8cb93a386Sopenharmony_ci// EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL
9cb93a386Sopenharmony_ci// DO NOT USE -- FOR INTERNAL TESTING ONLY
10cb93a386Sopenharmony_ci
11cb93a386Sopenharmony_ci#ifndef sk_matrix_DEFINED
12cb93a386Sopenharmony_ci#define sk_matrix_DEFINED
13cb93a386Sopenharmony_ci
14cb93a386Sopenharmony_ci#include "include/c/sk_types.h"
15cb93a386Sopenharmony_ci
16cb93a386Sopenharmony_ciSK_C_PLUS_PLUS_BEGIN_GUARD
17cb93a386Sopenharmony_ci
18cb93a386Sopenharmony_ci/** Set the matrix to identity */
19cb93a386Sopenharmony_civoid sk_matrix_set_identity(sk_matrix_t*);
20cb93a386Sopenharmony_ci
21cb93a386Sopenharmony_ci/** Set the matrix to translate by (tx, ty). */
22cb93a386Sopenharmony_civoid sk_matrix_set_translate(sk_matrix_t*, float tx, float ty);
23cb93a386Sopenharmony_ci/**
24cb93a386Sopenharmony_ci    Preconcats the matrix with the specified translation.
25cb93a386Sopenharmony_ci        M' = M * T(dx, dy)
26cb93a386Sopenharmony_ci*/
27cb93a386Sopenharmony_civoid sk_matrix_pre_translate(sk_matrix_t*, float tx, float ty);
28cb93a386Sopenharmony_ci/**
29cb93a386Sopenharmony_ci    Postconcats the matrix with the specified translation.
30cb93a386Sopenharmony_ci        M' = T(dx, dy) * M
31cb93a386Sopenharmony_ci*/
32cb93a386Sopenharmony_civoid sk_matrix_post_translate(sk_matrix_t*, float tx, float ty);
33cb93a386Sopenharmony_ci
34cb93a386Sopenharmony_ci/** Set the matrix to scale by sx and sy. */
35cb93a386Sopenharmony_civoid sk_matrix_set_scale(sk_matrix_t*, float sx, float sy);
36cb93a386Sopenharmony_ci/**
37cb93a386Sopenharmony_ci    Preconcats the matrix with the specified scale.
38cb93a386Sopenharmony_ci        M' = M * S(sx, sy)
39cb93a386Sopenharmony_ci*/
40cb93a386Sopenharmony_civoid sk_matrix_pre_scale(sk_matrix_t*, float sx, float sy);
41cb93a386Sopenharmony_ci/**
42cb93a386Sopenharmony_ci    Postconcats the matrix with the specified scale.
43cb93a386Sopenharmony_ci        M' = S(sx, sy) * M
44cb93a386Sopenharmony_ci*/
45cb93a386Sopenharmony_civoid sk_matrix_post_scale(sk_matrix_t*, float sx, float sy);
46cb93a386Sopenharmony_ci
47cb93a386Sopenharmony_ciSK_C_PLUS_PLUS_END_GUARD
48cb93a386Sopenharmony_ci
49cb93a386Sopenharmony_ci#endif
50