summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-11-121-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure doc/src/snippets/code/doc_src_qmake-manual.qdoc mkspecs/features/symbian/application_icon.prf mkspecs/features/symbian/default_post.prf mkspecs/features/symbian/symbian_building.prf qmake/generators/symbian/initprojectdeploy_symbian.cpp src/multimedia/audio/audio.pri src/network/access/qnetworkaccessmanager.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl_p.h src/plugins/bearer/corewlan/qcorewlanengine.mm src/plugins/phonon/mmf/mmf.pro tests/auto/qscriptvalue/tst_qscriptvalue.cpp tests/auto/qscriptvalue/tst_qscriptvalue.h tools/qdoc3/doc/qdoc-manual.qdocconf
| * Fix possible crash in QStaticText and QDeclarativeTextLayoutEskil Abrahamsen Blomfeldt2010-10-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The QStaticTextItem held an uncounted reference to QFontEngine. The pointer would dangle in some cases where there was no font object referencing the engine and the cache was cleaned out (e.g. when a new application font is added.) Properly count the reference, and also add reference counting to userData to make it harder to shoot yourself in the foot, since the QStaticTextItem class is now being used in different places, Task-number: QTBUG-14446 Reviewed-by: Martin Jones
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-09-301-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (24 commits) Stabilize tst_QGraphicsWidget::QT_BUG_13865_doublePaintWhenAddingASubItem Fixed accessing freed memory in raster engine. Build fix for -qtnamespace. Fixed parsing of SVGs with absolute font sizes. Moving QPdf::stripSpecialCharacter to fontengine Revert "Fix (implement!) hfw/wfh in QGridLayoutEngine" Fixed a layout issue where you could get NaN as dimensions QTextCodec: Fix valgrind warning when using QTextCodec in destructions functions Fix double painting when adding an item into a linear layout Fixed antialiased rasterization bug in raster engine. Fixed potential crash when loading corrupt GIFs. Work around an ATI driver problem with mutli-sampled pbuffers. tst_qstatemachine.cpp: fix compilation with Sun Studio Fixed regression in clipping.qps autotest on 64-bit. Fixed crash when using Qt::WA_DeleteOnClose on a QPrintDialog on Mac. Fixed performance regression in curve stroking. Don't disable texture_from_pixmap on GLX/X11 by default. Avoid creating copy of an image in memory when storing as png Doc update for the support of MSVC 2010 64-bit fix documentation of drawText(int, int, int, int, ... ...
* | \ Merge commit 'c1f9978c9d61bcbdb2f280185a3abdea13d7f532' into master-from-4.7Rohan McGovern2010-10-051-1/+1
|\ \ \ | | |/ | |/|
| * | fix documentation of drawText(int, int, int, int, ...Gunnar Sletta2010-09-271-1/+1
| | |
* | | Merge remote branch 'origin/4.7' into master-from-4.7Rohan McGovern2010-10-041-4/+4
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/snippets/code/doc_src_qmake-manual.qdoc src/corelib/arch/symbian/arch.pri src/declarative/graphicsitems/qdeclarativeflickable.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h tests/auto/qfontmetrics/tst_qfontmetrics.cpp
| * | Fixed performance issue in QML clipping with OpenGL 2.0 paint engine.Samuel Rødal2010-09-281-4/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 4c515ceb fixed Intersect and Unite-clipping after doing setClipping(false), but also introduced a performance problem. If there was no pre-existing clip we'd convert IntersectClips to ReplaceClips, which is unnecessary since the paint engines already handle this correctly. IntersectClips can be handled much more efficiently in the OpenGL 2 paint engine for example. We only need to convert to ReplaceClip when someone has used setClipEnabled(false) which is anyways expensive and not recommended. Reviewed-by: Trond
* | Fix QPainter::clipBoundingRect() for QRectF clip.Andreas Kling2010-09-261-0/+2
| | | | | | | | | | | | | | clipBoundingRect() wasn't handling QPainterClipInfo::RectFClip properly, mistaking it for PathClip. Reviewed-by: Samuel Rødal
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-09-211-1/+1
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.h src/declarative/graphicsitems/qdeclarativeflickable.cpp src/declarative/graphicsitems/qdeclarativeflickable_p_p.h src/declarative/util/qdeclarativelistmodel.cpp
| * Merge commit 'staging-1/4.7' into doc-4.7Morten Engvoldsen2010-09-031-2/+3
| |\
| * \ Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/qt-doc-team into doc-4.7Morten Engvoldsen2010-09-021-1/+1
| |\ \
| | * | Fixed spelling, broken links, and missing default values.Jerome Pasion2010-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | Tasks: QTBUG-13271, QTBUG-13212, QTBUG-12321 Reviewer: David Boddie
* | | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-09-101-2/+3
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt demos/declarative/snake/content/snake.js demos/declarative/snake/snake.qml doc/src/development/qmake-manual.qdoc src/corelib/plugin/plugin.pri src/gui/kernel/qapplication_win.cpp src/gui/kernel/qdesktopwidget_win.cpp src/gui/painting/qdrawhelper.cpp tests/auto/qdir/tst_qdir.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf
| * | | Fix a crash when passing a null pixmap to QPainter::drawPixmapFragments().Trond Kjernåsen2010-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-13331 Reviewed-by: Samuel
| * | | Fix QStaticText with OpenGL1 engineEskil Abrahamsen Blomfeldt2010-08-301-1/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Like OpenGL2 and OpenVG, the OpenGL1 paint engine also transforms text coordinates itself and does not require QStaticText to use device coordinates. Task-number: QTBUG-13228 Reviewed-by: Samuel
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-08-301-3/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | Conflicts: qmake/generators/win32/msbuild_objectmodel.cpp qmake/generators/win32/msvc_vcxproj.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp
| * | Apparently QPen::brush() can't return a NoBrush for a NoPen.Trond Kjernåsen2010-08-271-4/+4
| |/ | | | | | | | | | | | | | | There are explicit tests in qdatastream for this. IMO it's wrong, wrong, wrong, but it's currently abused in the SVG module so we can't change it. Reviewed-by: Gunnar
* | Merge branch 'qt-master-from-4.7' of ↵Qt Continuous Integration System2010-08-251-2/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scm.dev.nokia.troll.no:qt/qt-integration into master-integration * 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (168 commits) Remove enums from bitfield, since all compilers do not support them. Don't circumvent onDestruction handlers when clearing expression in delegate cleanup Fix responseText to check the charset encoding field and also to not Re-insert and emit the correct NOTIFY signals following the removal Fix poor flicking behavior with slower flicks. Alignment of shadow for rich text is broken when using text styles typo Setting one dimension of the sourceSize should set the other dimension. Document calling QObject methods from QML in Extending QML in C++ docs. Stabilize tst_qgraphicsscene QDeclarativeDebug: send a message when new object are added QDeclarativeEngineDebugServer: make it a singleton. Fixed compile error in runonphone. Fix mispositioned text with QStaticText and OpenVG graphics system Use binarysort to find items. Use QImage 'convertInPlace' versions in QVGPixmapData load functions. QGraphicsView: Fix assert that may occurs if there are 'empty' item to draw, and changed() signal connected Added an install target to runonphone. Fix tst_Collections::QTBUG13079_collectionInsideCollection Fix few declarative code issues discovered by static code analysis ...
| * \ Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-08-251-2/+5
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/win32/msbuild_objectmodel.cpp src/declarative/qml/qdeclarativexmlhttprequest.cpp src/opengl/opengl.pro src/opengl/qgl_p.h src/plugins/bearer/connman/qconnmanservice_linux.cpp tests/auto/qpainter/tst_qpainter.cpp tools/assistant/tools/assistant/helpviewer_qwv.h tools/assistant/tools/assistant/openpageswidget.h
| | * Fix mispositioned text with QStaticText and OpenVG graphics systemEskil Abrahamsen Blomfeldt2010-08-241-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OpenVG paint engine, like the OpenGL2 paint engine, supports caching the untransformed glyphs and transforming them as they are drawn. Since we would pretransform the positions of the glyphs, the transformation would be applied twice, thus making the glyphs appear in the wrong location when the painter had a transform set. Task-number: QTBUG-13049 Reviewed-by: Gunnar
* | | Fix tabArray support for boundingRect measurementJiang Jiang2010-08-231-1/+8
|/ / | | | | | | | | | | | | | | | | | | | | QFontMetrics::boundingRect() and size() accept a tabArray as argument to measure the size of string, but tabArray argument has no effect because qt_format_text() just ignore that. This patch make it handle tabArray so that measurement for tab aligned text can be handled correctly. Task-number: QTBUG-4904 Reviewed-by: Eskil
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-08-131-6/+59
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qpainter.cpp src/gui/text/qtextengine.cpp tests/auto/qimage/tst_qimage.cpp tests/auto/qpainter/tst_qpainter.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf
| * Add text decoration support to QStaticTextJiang Jiang2010-08-101-13/+71
| | | | | | | | | | | | | | | | | | | | | | | | The original code path of QStaticText does not include decoration drawing, this patch generalized the drawTextItemDecoration() function to draw decoration for drawText(), then use that to draw decoration for QStaticText. A helper function called drawDecorationForGlyphs() is made to allow easier extension for direct glyphs drawing support. Task-number: QTBUG-12121 Reviewed-by: Eskil
* | Added QPainter::clipBoundingRect() which is significantly fasterGunnar Sletta2010-08-091-0/+55
| | | | | | | | | | | | | | than QPainter::clipRegion().boundingRect(). Task: http://bugreports.qt.nokia.com/browse/QTBUG-12618 Reviewed-by: Kim
* | Merge remote branch 'origin/master' into qt-master-from-4.7Thiago Macieira2010-07-151-13/+55
|\ \ | | | | | | | | | | | | Conflicts: src/opengl/qgl_p.h
| * | Support text decoration in QPainter::drawGlyphs()Eskil Abrahamsen Blomfeldt2010-07-141-13/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to support text decorations (overline, underline and strikeout) in QPainter::drawGlyphs(), we need to call drawTextItemDecoration() from this function. To support this, it has been generalized to no longer require a QTextItemInt. We also need to propagate the decoration attributes of the font from QTextLayout to QGlyphs, since this is not part of the QFontEngine. Task-number: QTBUG-12122 Reviewed-by: Kim
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-07-151-1/+10
|\ \ \ | |/ / |/| / | |/ | | Conflicts: src/gui/kernel/qapplication.h
| * Warn when drawPixmapFragments is called with an invalid source rectAndy Shaw2010-07-051-0/+9
| | | | | | | | | | | | | | | | | | | | When drawPixmapFragments() is called with fragments that has invalid source rects in it, then usually it causes the pixmap drawn on screen to appear corrupted. However it has been reported that a crash can occur (not reproducable locally) so by adding a warning in debug mode only means that this can hopefully be caught at development time. Reviewed-by: Trond
| * Made -graphicssystem trace work with Qt::TextBypassShaping flag.Samuel Rødal2010-06-291-1/+1
| | | | | | | | | | | | The QPaintBuffer gets the text from the text item in order to stream it. Reviewed-by: Jocelyn Turcotte
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-07-061-6/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (24 commits) QGLPixelBuffer should not rely on temporary QGLWidgets. Initialize pex. Remove warning. Fix the tests for the internal GL resource system. Rework how QGLTextureGlyphCache makes use of the resource system. The group pointer should no longer be a part of the 64 bit int. Enable glyph uploads from a thread in the X11 font engine. Make qt_pixmap_serial thread-safe. Clean up debug output. Clarification regarding the WA_X11InitThreads flag. Rework the internal GL resource system yet again. Check Qt::AA_X11InitThreads to determine pixmap usage in threads. Add an application attribute to control XInitThreads(). Unnecessary alloc + remove unused headers. QGLPixelBuffer should manage its own paint engines. Remove the DDS texture cache. Make the GL texture cache share textures between shared contexts. Redesigned how GL resource management works. Don't use the QGLSignalProxy to clean up the thread-local shaders. Simplify how the QGLEngineSharedShaders object is cleaned up. ...
| * | QGLPixelBuffer should not rely on temporary QGLWidgets.Trond Kjernåsen2010-07-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Use QGLTemporaryContext instead. Also, to re-use already registered window classes for the temporary native window, make qt_reg_wndclass() register a QWidget default class if it's passed a 0 pointer. Reviewed-by: Gunnar
| * | Check Qt::AA_X11InitThreads to determine pixmap usage in threads.Trond Kjernåsen2010-07-021-6/+7
| | |
| * | More work on GL threading.Trond Kjernåsen2010-07-021-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed QObject inheritance from QGLEngineSharedShaders and made it thread-local, so that paintengines in different threads can use programs without clashing. Lifted some restrictions on QPixmap so that they may be used in threads when the GL2 engine is active. Made the QGLContextGroup a part of the pixmap and image cache keys.
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-07-011-9/+9
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | Conflicts: bin/syncqt src/gui/text/qtextlayout.cpp tools/assistant/tools/assistant/helpviewer_qwv.cpp tools/assistant/tools/assistant/helpviewer_qwv.h tools/configure/configureapp.cpp
| * Speed up calls to QPainter::setCompositionMode when the mode is unchangedSimon Hausmann2010-06-171-0/+2
| | | | | | | | | | | | | | | | Avoid marking the composition mode as dirty and calling into the extended engine if the composition mode that the application wants to set is the same that's currently used. Reviewed-by: Gunnar
| * Fixed missing stroke for flat ellipses.Samuel Rødal2010-06-151-4/+0
| | | | | | | | | | | | | | The behavior should be the same as for arcs and rects. Task-number: QTBUG-2743 Reviewed-by: Eskil
| * LayoutDirectionAuto is the default layout direction for QPainterLars Knoll2010-06-091-5/+7
| | | | | | | | | | | | | | | | | | Don't retrieve the layout direction from QWidget or QApplication anymore. Respect if somebody explicitly sets the direction with setLayoutDirection(). Task-number: Part of QT-3292 Reviewed-by: Simon Hausmann
* | Merge remote branch 'origin/master'Olivier Goffart2010-06-151-10/+38
|\ \ | | | | | | | | | | | | Conflicts: src/gui/painting/qpainter.cpp
| * \ Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-06-081-10/+38
| |\ \ | | |/ | | | | | | | | | Conflicts: tools/qdoc3/test/qt-html-templates.qdocconf
| | * More Pixmap cache key optimizationsJens Bache-Wiig2010-06-021-4/+4
| | | | | | | | | | | | Reviewed-by: ogoffart
| | * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-06-021-0/+17
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Some optimizations for QImage::load() fix setRawData() Fix QML crashes on the N900 doc: Added DITA XML generator Fix build failure on Symbian 3.1. Add the Qt::TextBypassShaping flag. QTextEngine: skip an unnecessary call to GetDeviceCaps on Windows. Add my 4.7.0 changes qdoc: Added DITA XML generator doc: Fixed confusing ownership issue. update Russian translations for Qt tools update Russian translation for Qt libraries QXmlSchema documentation correction doc: Changed last breadcrumb to not be a link. doc: Fixed reference to setSize(), which is in QRectF. QNetworkCookie: do not accept cookies with non-alNum domain QtDeclarative: Remove trailing commas in enums Doc: MonotonicClock is obviously monotonic
| | | * Add the Qt::TextBypassShaping flag.Jocelyn Turcotte2010-05-311-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows quick layouting especially with Windows fonts which contain heavy OpenType logic. On regular latin text the visual compromize is the loss of kerning, justification, capitalization, word spacing and letter spacing support. Reviewed-by: Simon Hausmann Reviewed-by: Eskil
| | * | Speed up QStaticText with affine transformation on GL2 engineEskil Abrahamsen Blomfeldt2010-06-011-6/+17
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the OpenGL2 paint engine supports transforming the prerendered glyphs rather than rasterizing the glyphs with the transformation applied, we don't need to recalculate the QStaticText layout whenever the transformation changes. This means that we can do fast animated transforms for QStaticText on this paint engine. A quick test yields something like 100x speed-up on Windows. This also give visually better results, as we previously would animate the hinting of the glyphs, thus causing jittering. The autotest has been updated to reflect the fact that drawText() and drawStaticText() now go through identical paths on GL, also when transforms are set on the painter. However, the scale was changed in one test, because it was so great that drawText() would fall back to paths. With QStaticText the idea is speed, so you'll get a poor, but fast result instead, which is better than tricking people. Reviewed-by: Samuel
* | | New class: QGlyphsEskil Abrahamsen Blomfeldt2010-06-041-12/+40
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Introduce an API to access glyph indexes in a font directly. A bug was discovered during this work, where different hinting flags in loadGlyph() and loadGlyphMetrics() would make the metrics in the two functions different, thus causing drawCachedGlyphs() (which uses loadGlyphMetrics() indirectly) to use different metrics than the standard drawTextItem() code path (which uses loadGlyph()). The bug was visible in the tst_QGlyphs::drawExistingGlyphs() test. Reviewed-by: Simon Hausmann
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-05-201-22/+21
|\ \ | |/
| * Merge remote branch 'origin/4.7' into HEADOlivier Goffart2010-05-191-2/+7
| |\ | | | | | | | | | | | | Conflicts: src/corelib/tools/qlocale_symbian.cpp
| * | doc: Fixed many broken links.Martin Smith2010-05-191-22/+21
| | |
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-05-191-2/+7
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tools/assistant/tools/assistant/centralwidget.cpp tools/assistant/tools/assistant/helpviewer_qwv.cpp tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf
| * | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-05-171-2/+7
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/demos.pro mkspecs/features/resources.prf mkspecs/features/uic.prf src/corelib/io/qurl.cpp src/corelib/tools/qlocale_symbian.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicswidget_p.cpp src/gui/graphicsview/qgraphicswidget_p.h src/gui/util/qsystemtrayicon_win.cpp src/multimedia/audio/qaudioinput.cpp tests/auto/qhostinfo/qhostinfo.pro
| | * Recalculate script item widths when forcing justificationEskil Abrahamsen Blomfeldt2010-05-061-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When going through the special WebKit code path for text drawing and forcing justification for text, we would set the justification in the text engine, but never actually update the widths of the script items. Since the width of the script item is used to position the text, the text would be drawn with the correct justification, but the position would be set based on the non-justified text width. The result was overlapping text whenever the script of the text changed. The fix goes through the justified glyphs and sets the width and position based on the new effective advance. Task-number: QTBUG-10421 Reviewed-by: Simon Hausmann