コード例 #1
0
ファイル: mainwindow.cpp プロジェクト: lohasbai/Picture-Size
void MainWindow::StartManipulate()
{
    heightTimes = heightEdit->text().toFloat();
    widthTimes = widthEdit->text().toFloat();
    rotateDegree = rotateEdit->text().toFloat();
    mode = modeSelect->currentIndex();
    method = methodSelect->currentIndex();

    if (heightTimes <= 0 || widthTimes <= 0 || srcImg->width()*widthTimes >= 1450 || srcImg->height()*heightTimes >= 1450)
    {
        this->WarningShow();
    }
    else
    {
        destImg = Manipulate(srcImg, heightTimes, widthTimes, rotateDegree, mode, method);
        this->ImageShow(destImg);
    }
}
コード例 #2
0
ファイル: viewer.cpp プロジェクト: PNCG/neuron
void Viewer::UseTool (Tool* t, Event& e) {
    Transformer* relative = ComputeRel(this, _graphic->GetTransformer());
    Manipulator* m = t->CreateManipulator(this, e, relative);

    if (m != nil) {
        Manipulate(m, e);
        Command* cmd = t->InterpretManipulator(m);

        if (cmd != nil) {
            cmd->Execute();

            if (cmd->Reversible()) {
                cmd->Log();
	    } else {
		delete cmd;
            }
        }
        delete m;
    }
    Unref(relative);
}
コード例 #3
0
ファイル: lineinput.cpp プロジェクト: Laxa/ddnet
void CLineInput::ProcessInput(IInput::CEvent e)
{
	Manipulate(e, m_Str, MAX_SIZE, MAX_CHARS, &m_Len, &m_CursorPos, &m_NumChars);
}
コード例 #4
0
ファイル: lineinput.cpp プロジェクト: ftk/XXLDDRace
void CLineInput::ProcessInput(IInput::CEvent e)
{
	Manipulate(e, m_Str, sizeof(m_Str), &m_Len, &m_CursorPos);
}