override public void Render(RenderSupport support, float parentAlpha) { if (_clipRect != null) { Rect clipRect = support.PushClipRect(GetClipRectNR(stage)); if (ToolSet.IsEmptyRect(ref clipRect)) { // empty clipping bounds - no need to render children. support.PopClipRect(); return; } } base.Render(support, parentAlpha); if (_clipRect != null) { support.PopClipRect(); } }
private void __mouseMove(object obj) { MouseEvent evt = (MouseEvent)obj; float xx = evt.StageX / GRoot.contentScaleFactor; float yy = evt.StageY / GRoot.contentScaleFactor; if (!ToolSet.IsEmptyRect(ref sDragBounds)) { if (xx < sDragBounds.x || yy < sDragBounds.y || xx + _owner.width > sDragBounds.xMax || yy + _owner.height > sDragBounds.yMax) { return; } } _owner.SetXY((int)(sLocalDragStart.x + xx - sGlobalDragStart.x), (int)(sLocalDragStart.y + yy - sGlobalDragStart.y)); }
private void __touchMove2(EventContext context) { InputEvent evt = context.inputEvent; float xx = evt.x / GRoot.contentScaleFactor; float yy = evt.y / GRoot.contentScaleFactor; if (!ToolSet.IsEmptyRect(ref sDragBounds)) { if (xx < sDragBounds.x || yy < sDragBounds.y || xx + _owner.width > sDragBounds.xMax || yy + _owner.height > sDragBounds.yMax) { return; } } _owner.SetXY((int)(sLocalDragStart.x + xx - sGlobalDragStart.x), (int)(sLocalDragStart.y + yy - sGlobalDragStart.y)); }