author | zecke <zecke> | 2004-04-14 18:38:37 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-14 18:38:37 (UTC) |
commit | 0b83b10334da449fb9304c9b89a4175f3728d377 (patch) (side-by-side diff) | |
tree | 465cdb61d1fa032de425761ef0074ee58bad7cd2 /noncore/graphics/opie-eye/lib | |
parent | b671d282c25e86429727b6b52a674d1d8cd3f1a7 (diff) | |
download | opie-0b83b10334da449fb9304c9b89a4175f3728d377.zip opie-0b83b10334da449fb9304c9b89a4175f3728d377.tar.gz opie-0b83b10334da449fb9304c9b89a4175f3728d377.tar.bz2 |
-comments on imagezoomer
recalculateGrid Alwin please fill in the blank
Diffstat (limited to 'noncore/graphics/opie-eye/lib') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/lib/oimagezoomer.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/lib/oimagezoomer.cpp b/noncore/graphics/opie-eye/lib/oimagezoomer.cpp index 4df5dcc..00b93e2 100644 --- a/noncore/graphics/opie-eye/lib/oimagezoomer.cpp +++ b/noncore/graphics/opie-eye/lib/oimagezoomer.cpp @@ -170,12 +170,21 @@ void OImageZoomer::drawContents( QPainter* p ) { * rect. So image size relates to contentRect * */ QRect c( contentsRect() ); p->setPen( Qt::red ); + /* + * the contentRect is set equal to the size of the image + * Rect/Original = NewRectORWidth/OriginalVisibleStuff and then simply we + * need to add the c.y/x due usage of QFrame + * For x and y we use the visiblePoint + * For height and width we use the size of the viewport + * if width/height would be bigger than our widget we use this width/height + * + */ int len = m_imgSize.width(); int x = (c.width()*m_visPt.x())/len + c.x(); int w = (c.width()*m_visSize.width() )/len + c.x(); if ( w > c.width() ) w = c.width(); len = m_imgSize.height(); |