Lines Matching defs:rect

486 ShowImageView::ConstrainToImage(BRect& rect) const
488 rect = rect & fBitmap->Bounds();
580 BRect rect(fBitmap->Bounds());
583 float bitmapWidth = rect.Width() + 1;
584 float bitmapHeight = rect.Height() + 1;
591 return rect;
594 rect.right = floorf(bitmapWidth * fZoom) - 1;
595 rect.bottom = floorf(bitmapHeight * fZoom) - 1;
598 bitmapWidth = rect.Width() + 1.0;
599 bitmapHeight = rect.Height() + 1.0;
603 rect.OffsetBy(floorf((width - bitmapWidth) / 2.0), 0);
606 rect.OffsetBy(0, floorf((height - bitmapHeight) / 2.0));
608 return rect;
628 ShowImageView::_LayoutCaption(BFont& font, BPoint& pos, BRect& rect)
643 rect.Set(0, 0, width + 4, height + 4);
644 rect.OffsetTo(pos);
645 rect.OffsetBy(-2, -2 - fontHeight.ascent); // -2 for border
654 BRect rect;
655 _LayoutCaption(font, position, rect);
662 FillRect(rect);
680 BRect rect;
681 _LayoutCaption(font, pos, rect);
684 BRegion clip(rect);
687 Draw(rect);
693 ShowImageView::_DrawImage(BRect rect)
701 DrawBitmap(fDisplayBitmap, fDisplayBitmap->Bounds(), rect, options);
716 BRect rect = _AlignBitmap();
717 fBitmapLocationInView.x = floorf(rect.left);
718 fBitmapLocationInView.y = floorf(rect.top);
720 _DrawBackground(rect);
721 _DrawImage(rect);
747 BRect rect = fSelectionBox.Bounds().OffsetToCopy(B_ORIGIN);
750 rect.right = floorf((rect.right + 1.0) * fZoom - 1.0);
751 rect.bottom = floorf((rect.bottom + 1.0) * fZoom - 1.0);
753 BView view(rect, NULL, B_FOLLOW_NONE, B_WILL_DRAW);
754 BBitmap* bitmap = new(nothrow) BBitmap(rect, hasAlpha ? B_RGBA32
775 fSelectionBitmap->Bounds().OffsetToCopy(B_ORIGIN), rect);
777 view.DrawBitmap(fBitmap, fCopyFromRect, rect);
781 fSelectionBitmap->Bounds().OffsetToCopy(B_ORIGIN), rect);
783 view.DrawBitmap(fBitmap, fCopyFromRect, rect);
787 view.FillRect(rect, B_SOLID_HIGH);
883 // Offset and scale the rect
884 BRect rect(selectionRect);
885 rect = ImageToView(rect);
886 rect.InsetBy(-1, -1);
887 DragMessage(&drag, rect);
1763 BRect rect(fBitmap->Bounds());
1765 s = size / (rect.Width() + 1.0);
1767 if (s * (rect.Height() + 1.0) <= size) {
1768 rect.right = size - 1;
1769 rect.bottom = static_cast<int>(s * (rect.Height() + 1.0)) - 1;
1771 rect.OffsetBy(0, (size - rect.IntegerHeight()) / 2);
1773 s = size / (rect.Height() + 1.0);
1774 rect.right = static_cast<int>(s * (rect.Width() + 1.0)) - 1;
1775 rect.bottom = size - 1;
1777 rect.OffsetBy((size - rect.IntegerWidth()) / 2, 0);
1782 Scaler scaler(fBitmap, rect, msgr, 0, true);
1794 const int32 deltaX = (int32)rect.left;
1795 const int32 deltaY = (int32)rect.top;
1797 for (int32 y = 0; y <= rect.IntegerHeight(); y++) {
1798 for (int32 x = 0; x <= rect.IntegerWidth(); x++) {