Example #1
0
void CWBProcess::OnMouseLButtonUp( MouseFlag flag, PtPos& point )
{
    if (m_bLeftDown && GetInterfacePtr())
    {
        switch (m_CurIdent)
        {
        case ID_WB_POS:
            GetInterfacePtr()->EdtDrawArea(m_MouseIni, point);
            break;
        case ID_WB_PTR:
            _DrawIndicator(point);
            break;
        case ID_WB_IMG:
            _DrawImage(m_CtrlAttr.ctImage.idName, point, point);
            // Para selecionar o controle POS apos desenhar a imagem
            GetInterfacePtr()->ToolBoxItemSel(ID_WB_POS);
            break;
        case ID_WB_TXT:
            m_CtrlAttr.Clear();
            m_CtrlAttr.ctName = WB_TXT;
            m_bCtrlTxt = true;
            GetInterfacePtr()->CtlEditTxt(m_MouseIni, point, m_CurFont, m_CurColor);
            break;
        case ID_WB_LIN:
            _DrawLine(m_MouseIni, point, m_CurLine, m_CurColor);
            break;
        case ID_WB_SQR:
            _DrawRect(m_MouseIni, point, m_CurLine, m_CurColor, false);
            break;
        case ID_WB_SQF:
            _DrawRect(m_MouseIni, point, m_CurLine, m_CurColor, true);
            break;
        case ID_WB_CRC:
            _DrawEllipse(m_MouseIni, point, m_CurLine, m_CurColor, false);
            break;
        case ID_WB_CRF:
            _DrawEllipse(m_MouseIni, point, m_CurLine, m_CurColor, true);
            break;
        case ID_WB_DEL:
            _DrawPoint(NULL, m_CurLine, m_DelColor, false);
            break;
        case ID_WB_PEN:
            _DrawPoint(NULL, m_CurLine, m_CurColor, false);
            break;
        case ID_WB_MRK:
            _DrawPoint(NULL, m_CurLine, m_MrkColor, true);
            break;
        }

        m_MousePos.SetAttr(point.X, point.Y);
    }

    m_bLeftDown = false;
}
Example #2
0
// FillEllipse
void
Painter::FillEllipse(BPoint center, float xRadius, float yRadius,
					 const pattern& p) const
{
	_DrawEllipse(center, xRadius, yRadius, p, true);
}
Example #3
0
// StrokeEllipse
void
Painter::StrokeEllipse(BPoint center, float xRadius, float yRadius,
					   const pattern& p) const
{
	_DrawEllipse(center, xRadius, yRadius, p, false);
}