aboutsummaryrefslogtreecommitdiff
path: root/dw/image.hh
AgeCommit message (Collapse)Author
2024-10-17Add support for aspect ratio in WidgetRodrigo Arias Mallo
Images should preserve their own aspect ratio, which is determined by the image buffer size, also known as the intrinsic size. Currently, when a child requests a requisition to be corrected by correctRequisition(), only the size was adjusted, ignoring the aspect ratio. The new Widget ratio variable holds the desired aspect ratio for the widget, and will only be taken into account when non-zero. In that case, then correcting the requisition, a naive algorithm tries to first increase the length of the small size to fill the preferred aspect ratio. In the case that it is not enough, the larger size is then decreased to fit the aspect ratio. And if that doesn't work either, the aspect ratio is not enforced and the widget will be distorted. There are special cases for correctRequisition() depending if the parent exists or not. The same approach is taken for both cases, but using the viewport size instead of the parent size.
2024-10-17Allow widgets to adjust new requisitionRodrigo Arias Mallo
When a widget calls the parent to correct its own requisition, let the child widget perform adjustments on the requisition. This allows images to control the height when the parent changes the width, so the image can preserve its own aspect ratio.
2015-06-08SRDOP: Positions relative to multiple references; design now considers ↵Sebastian Geerken
handling conflicts.
2015-06-06SRDOP: Positions also for extremes.Sebastian Geerken
2015-05-20Size requisitions depending on positions (SRDOP): added method signatures.Sebastian Geerken
2015-01-23Simplified interrupted drawing. (Mouse events will follow.)Sebastian Geerken
2015-01-03Merge with main repo.Sebastian Geerken
2015-01-02Some more work on 'adjust_min_width' correction.Sebastian Geerken
2014-10-23Changed signature of Widget::draw and friends.Sebastian Geerken
2014-10-23Removed old Widget::draw (backward compatibility is not possible anyway).Sebastian Geerken
2014-07-22Fixed bug in image scaling.Sebastian Geerken
2014-07-03Widget::getExtremesImpl is now abstract; this way, getExtremes can avoid to ↵Sebastian Geerken
call sizeRequest.
2014-06-17Implemented containerSizeChangedForChildren() for all widgets.Sebastian Geerken
2013-10-22Extended ImgRenderer; new option (in the code) for drawing background images ↵Sebastian Geerken
at once.
2013-09-10Some refactoring: the image decoding code now only accesses ↵Sebastian Geerken
dw::core::ImgRenderer, not dw::Image (which now implements the former) anymore.
2010-03-21make drawing image map shapes work when <img> precedes <map>Johannes Hofmann
http://lists.auriga.wearlab.de/pipermail/dillo-dev/2010-March/007406.html Johannes wrote the code, and I (corvid) added some big comments of the sort alluded to in that thread.
2010-03-11draw image maps when image not loadedcorvid
http://lists.auriga.wearlab.de/pipermail/dillo-dev/2010-March/007393.html (Johannes has already fixed the Rectangle clipping problem. Why the polygons aren't shown initially isn't known yet.)
2009-11-30documentation: update references to LinkReceivercorvid
2009-07-20fix image map coordinates when margin/border/padding are presentcorvid
2009-02-09whitespace cleanup: 's/ +$//g'Jorge Arellano Cid
2008-09-24- Moved the dw2 tree into dillo2's tree.jcid