Summary: | View image with transparent area not clipped correctly | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Andrew Walker <arwalker> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Andrew Walker
2006-06-21 20:30:14 UTC
The problem is that the clipRegion() for the image is being incorrectly returned, because _clipMask is being incorrectly calculated. In turn _clipMask is incorrectly calculated as KstViewPicture::transparent() is returning false and so the KstViewObject::paintSelf() code is filling in the entire geometry of the image. This results in a clipRegion() which is the entire area of the image, instead of only its non-transparent area. And finally, this occurs because _iCache is not valid immediately after hitting the Ok button in the edit dialog, so _iCache.hasAlphaBuffer() will return false in such conditions. SVN commit 558770 by arwalker: BUG:129595 Correctly handle transparency of images with alpha buffers M +5 -1 kstviewpicture.cpp --- trunk/extragear/graphics/kst/src/libkstapp/kstviewpicture.cpp #558769:558770 @@ -272,7 +272,11 @@ bool KstViewPicture::transparent() const { - return _iCache.hasAlphaBuffer(); + if (!_iCache.isNull()) { + return _iCache.hasAlphaBuffer(); + } + + return _image.hasAlphaBuffer(); } |