Commit graph

5 commits

Author SHA1 Message Date
Federico Mena Quintero 6e0777eeef Another attempt at fixing auto-sizing; it seems to work now. Maybe
2000-08-18  Federico Mena Quintero  <federico@helixcode.com>

	Another attempt at fixing auto-sizing; it seems to work now.
	Maybe GtkScrollFrame is not *that* broken...

	* window.c (window_construct): Do not set the default size of the
	window.
	(window_init): Set the window policy to allow_shrink.
	(auto_size): Set the usize of the image view to our preferred size.
	(window_open_image_dialog): Add a grab on the dialog so that the
	user cannot invoke commands on the window!
	(hide_cb): Remove the grab when the dialog is hidden.
	(window_open_image_dialog): Sigh.  Add an accel group so that
	pressing Escape can close the open dialog.

	* gtkscrollframe.c (gtk_scroll_frame_size_request): Do pay
	attention to the child's requisition; this restores the code to
	its original state.
	(gtk_scroll_frame_size_allocate): Make sure the the
	child_allocation is nonnegative (bugfix merge from Evolution).

	* image-view.c (image_view_size_request): Request a size of zero.
2000-08-18 23:25:46 +00:00
Federico Mena Quintero 1bda924eb7 Last night's preparations for 0.4 - Federico 2000-08-16 20:42:08 +00:00
Federico Mena Quintero 19b37bce67 Plane hacking; scrolling engine is officially done(tm) now2000-06-20 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (paint_rectangle): Special-case zoom == 1.0 to
	unconditionally use GDK_INTERP_NEAREST.  Pixops should optimize
	this itself, but things seem to be slower if you use other
	interpolation types even when the zoom is 1.0.  Also,
	short-circuit the fastest case to not create a temporary pixbuf
	and thus avoid a memcpy().
	(request_paint_area): Short-circuit NEAREST interpolation and zoom
	== 1.0 to paint synchronously.
	(scroll_to): Use request_paint_area() instead of calling
	uta_add_rect() directly.  This lets us do the short-circuiting
	there.
	(ImageViewPrivate): Added a second microtile array for
	interpolated drawing.
	(remove_dirty_region): Free both utas.
	(paint_iteration_idle): Handle both utas.  This is the core of
	two-pass scrolling:  when a rectangle is pulled from the first
	uta, add it to the second uta.
	(scroll_to): Handle both utas.
2000-06-21 01:07:07 +00:00
Federico Mena Quintero 59fbfdcf67 0.3 - Federico 2000-04-20 18:43:15 +00:00
Federico Mena Quintero 07cbb415f6 Some real work and some quick hacks to test the new scrolling/zooming
Some real work and some quick hacks to test the new scrolling/zooming
code.

2000-04-13  Federico Mena Quintero  <federico@helixcode.com>

	* image-view.c (image_view_size_allocate): Set the correct size
	for the window and recompute the adjustments.
	(paint_rectangle): The offset of the image with respect to the
	window is the negative of the adjustment offset.
	(image_view_destroy): Disconnect from the adjustments.
	(image_view_finalize): Unref the adjustments.  Free the private
	part of the ImageView structure here.
	(image_view_set_image): Queue a resize.  We still need to adjust
	or reset the scroll offsets.
	(image_view_set_zoom): Queue a resize.  We still need to re-center
	the zoom offsets.
	(adjustment_changed_cb): As a temporary solution, repaint the
	whole thing.  I need to finish uta_copy_area() for uta.c to be
	able to use gdk_window_copy_area() on the image window.

	* uta.c (uta_add_rect): Fixed computation of microtile
	coordinates.  Fixed a bunch of stupid off-by-one errors.
	(uta_remove_rect): Fixed computation of microtile coordinates and
	clipping coordinates.
	(uta_find_first_glom_rect): As a quick hack, use a bastardized
	version of art_rect_list_from_uta() to find the first glommed
	rectangle.  This will be replaced with a more efficient function
	in the future.
2000-04-13 19:22:05 +00:00