Commit 2aeb7bab authored by Lubosz Sarnecki's avatar Lubosz Sarnecki

src: Some formatting and renaming.

parent 2866e36b
......@@ -224,11 +224,8 @@ static void
_init_child_window (Example *self,
XrdWindow *window)
{
XrdWindow *child = _add_window (self,
"A child",
0.25f,
self->child_window_pixbuf,
FALSE);
XrdWindow *child = _add_window (self, "A child", 0.25f,
self->child_window_pixbuf, FALSE);
graphene_point_t offset = { .x = 25, .y = 25 };
xrd_window_add_child (window, child, &offset);
......@@ -293,11 +290,8 @@ _init_windows (Example *self)
float max_window_height = 0;
for (int row = 0; row < GRID_HEIGHT; row++)
{
XrdWindow *window = _add_window (self,
"A window.",
0.5f,
self->window_pixbuf,
TRUE);
XrdWindow *window = _add_window (self, "A window.", 0.5f,
self->window_pixbuf, TRUE);
window_x += xrd_window_get_current_width_meters (window);
......@@ -317,9 +311,7 @@ _init_windows (Example *self)
xrd_window_set_reset_transformation (window, NULL, 0);
if (col == 0 && row == 0)
{
_init_child_window (self, window);
}
_init_child_window (self, window);
}
window_x = 0;
window_y += max_window_height;
......
......@@ -463,7 +463,7 @@ _submit_texture (XrdWindow *window,
gchar *title;
g_object_get (window, "title", &title, NULL);
g_debug ("Texture %p was already submitted to window %p (%s).\n",
(void*) texture, (void*) window, title);
(void*) texture, (void*) window, title);
return;
}
......
......@@ -109,19 +109,18 @@ _interpolate_cb (gpointer _transition)
XrdWindow *window = transition->window;
float interpolation_curve =
- (float)pow ((double)transition->interpolate - 1.0, 4) + 1;
float curve = - (float)pow ((double)transition->interpolate - 1.0, 4) + 1;
graphene_matrix_t interpolated;
graphene_matrix_interpolate_simple (&transition->from,
&transition->to,
interpolation_curve,
curve,
&interpolated);
xrd_window_set_transformation (window, &interpolated);
float interpolated_scaling =
transition->from_scaling * (1.0f - interpolation_curve) +
transition->to_scaling * interpolation_curve;
transition->from_scaling * (1.0f - curve) +
transition->to_scaling * curve;
g_object_set (G_OBJECT(window), "scale", (double) interpolated_scaling, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment