예제 #1
0
// -----------------------------------------------------------------------------
// Called when the left button is released within the canvas
// -----------------------------------------------------------------------------
void GfxCanvas::onMouseLeftUp(wxMouseEvent& e)
{
	// Stop drawing
	if (drawing_)
	{
		drawing_ = false;
		memset(drawing_mask_, false, image_.width() * image_.height());
	}
	// Stop dragging
	if (drag_origin_.x >= 0)
	{
		endOffsetDrag();
		image_hilight_ = true;
		Refresh();
	}
}
예제 #2
0
파일: GfxCanvas.cpp 프로젝트: Gaerzi/SLADE
/* GfxCanvas::onMouseLeftUp
 * Called when the left button is released within the canvas
 *******************************************************************/
void GfxCanvas::onMouseLeftUp(wxMouseEvent& e)
{
	// Stop drawing
	if (drawing)
	{
		drawing = false;
		memset(drawing_mask, false, image->getWidth() * image->getHeight());
	}
	// Stop dragging
	if (drag_origin.x >= 0)
	{
		endOffsetDrag();
		image_hilight = true;
		Refresh();
	}
}