Lines Matching refs:allocation
79 struct rectangle allocation; in clamp_view() local
85 widget_get_allocation(image->widget, &allocation); in clamp_view()
87 if (sw < allocation.width) { in clamp_view()
89 (allocation.width - image->width * scale) / 2; in clamp_view()
93 if (sw + image->matrix.x0 < allocation.width) in clamp_view()
94 image->matrix.x0 = allocation.width - sw; in clamp_view()
97 if (sh < allocation.height) { in clamp_view()
99 (allocation.height - image->height * scale) / 2; in clamp_view()
103 if (sh + image->matrix.y0 < allocation.height) in clamp_view()
104 image->matrix.y0 = allocation.height - sh; in clamp_view()
112 struct rectangle allocation; in redraw_handler() local
121 widget_get_allocation(image->widget, &allocation); in redraw_handler()
122 cairo_rectangle(cr, allocation.x, allocation.y, in redraw_handler()
123 allocation.width, allocation.height); in redraw_handler()
126 cairo_translate(cr, allocation.x, allocation.y); in redraw_handler()
138 window_aspect = (double) allocation.width / allocation.height; in redraw_handler()
140 scale = allocation.height / height; in redraw_handler()
142 scale = allocation.width / width; in redraw_handler()
152 cairo_matrix_init_translate(&translate, allocation.x, allocation.y); in redraw_handler()
191 struct rectangle allocation; in enter_handler() local
193 widget_get_allocation(image->widget, &allocation); in enter_handler()
194 x -= allocation.x; in enter_handler()
195 y -= allocation.y; in enter_handler()
223 struct rectangle allocation; in motion_handler() local
225 widget_get_allocation(image->widget, &allocation); in motion_handler()
226 x -= allocation.x; in motion_handler()
227 y -= allocation.y; in motion_handler()