public void OnMouseDown(RagePixelState state) { if (Event.current.button != 0) { return; } IntVector2 pixel = state.ScreenToPixel(Event.current.mousePosition, false); IntVector2 minPixel = pixel - state.brush.m_BrushPivot; Utility.SetPixelsClamped(state.sprite.texture, minPixel, state.brush.m_Size, state.brush.m_Colors); state.sprite.texture.Apply(); m_LastMousePixel = pixel; state.Repaint(); Event.current.Use(); }