void ImageCtrl::Paint(Draw& w) { if(!img) return; Size sz = GetSize(); Size bsz = GetStdSize(); w.DrawImage((sz.cx - bsz.cx) / 2, (sz.cy - bsz.cy) / 2, img); }
Size QTFDisplayCls::RatioSize(const Value& q, int cx, int cy) const { if(cy == 0 && cx > 0) { RichText txt = ParseQTF((String)q); txt.ApplyZoom(GetRichTextStdScreenZoom()); return Size(cx, txt.GetHeight(Zoom(1, 1), cx)); } return GetStdSize(q); }
void Navigator::LineDisplay::Paint(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword style) const { DoPaint(w, r, q, ink, paper, style, min(r.GetWidth() - GetStdSize(q).cx, 0)); }