Lines Matching defs:state

31 void vg_init_state(struct vg_state *state)
33 state->matrix_mode = VG_MATRIX_PATH_USER_TO_SURFACE;
34 state->fill_rule = VG_EVEN_ODD;
35 state->image_quality = VG_IMAGE_QUALITY_FASTER;
36 state->rendering_quality = VG_RENDERING_QUALITY_BETTER;
37 state->blend_mode = VG_BLEND_SRC_OVER;
38 state->image_mode = VG_DRAW_IMAGE_NORMAL;
40 memset(state->scissor_rects, 0, sizeof(state->scissor_rects));
41 state->scissor_rects_num = 0;
43 state->color_transform = VG_FALSE;
44 state->color_transform_values[0] = 1.0f;
45 state->color_transform_values[1] = 1.0f;
46 state->color_transform_values[2] = 1.0f;
47 state->color_transform_values[3] = 1.0f;
48 state->color_transform_values[4] = 0.0f;
49 state->color_transform_values[5] = 0.0f;
50 state->color_transform_values[6] = 0.0f;
51 state->color_transform_values[7] = 0.0f;
54 state->stroke.line_width.f = 1.0f;
55 state->stroke.line_width.i = 1;
56 state->stroke.cap_style = VG_CAP_BUTT;
57 state->stroke.join_style = VG_JOIN_MITER;
58 state->stroke.miter_limit.f = 4.0f;
59 state->stroke.miter_limit.i = 4;
60 state->stroke.dash_pattern_num = 0;
61 state->stroke.dash_phase.f = 0.0f;
62 state->stroke.dash_phase.i = 0;
63 state->stroke.dash_phase_reset = VG_FALSE;
66 state->tile_fill_color[0] = 0.0f;
67 state->tile_fill_color[1] = 0.0f;
68 state->tile_fill_color[2] = 0.0f;
69 state->tile_fill_color[3] = 0.0f;
72 state->clear_color[0] = 0.0f;
73 state->clear_color[1] = 0.0f;
74 state->clear_color[2] = 0.0f;
75 state->clear_color[3] = 0.0f;
78 state->glyph_origin[0].f = 0.0f;
79 state->glyph_origin[1].f = 0.0f;
80 state->glyph_origin[0].i = 0;
81 state->glyph_origin[1].i = 0;
84 state->masking = VG_FALSE;
85 state->scissoring = VG_FALSE;
88 state->pixel_layout = VG_PIXEL_LAYOUT_UNKNOWN;
89 state->screen_layout = VG_PIXEL_LAYOUT_UNKNOWN;
92 state->filter_format_linear = VG_FALSE;
93 state->filter_format_premultiplied = VG_FALSE;
96 state->filter_channel_mask = (VG_RED | VG_GREEN | VG_BLUE | VG_ALPHA);
98 matrix_load_identity(&state->path_user_to_surface_matrix);
99 matrix_load_identity(&state->image_user_to_surface_matrix);
100 matrix_load_identity(&state->fill_paint_to_user_matrix);
101 matrix_load_identity(&state->stroke_paint_to_user_matrix);
102 matrix_load_identity(&state->glyph_user_to_surface_matrix);
105 struct matrix *vg_state_matrix(struct vg_state *state)
107 switch(state->matrix_mode) {
109 return &state->path_user_to_surface_matrix;
111 return &state->image_user_to_surface_matrix;
113 return &state->fill_paint_to_user_matrix;
115 return &state->stroke_paint_to_user_matrix;
118 return &state->glyph_user_to_surface_matrix;