void ZDCCanvas_X::FrameRegion(ZDCState& ioState, const ZDCRgn& inRgn) { if (!fDrawable) return; if (!ioState.fInk) return; if (ioState.fPenWidth <= 0) return; SetupLock theSetupLock(this); if (ZDCRgn localRgn = this->Internal_CalcClipRgn(ioState) & ((inRgn - inRgn.Inset(ioState.fPenWidth, ioState.fPenWidth)) + ioState.fOrigin)) { SetupInk theSetupInk(this, ioState); ZRect localBounds = localRgn.Bounds(); fXServer->SetRegion(fGC, localRgn.GetRegion()); ++fChangeCount_Clip; fXServer->FillRectangle(fDrawable, fGC, localBounds.left, localBounds.top, localBounds.Width(), localBounds.Height()); } }
ZDCRgn ZDragInitiator::OutlineRgn(const ZDCRgn& iRgn) { // Provides a place to do theme-sensitive outlining of regions (2 pixels on MacOS 8.5, 1 pixel just about everywhere else) return iRgn - iRgn.Inset(2, 2); }