void
ImageViewController::requestImageAndGridUpdate()
{
    // erase current grid
//    m_gridVG = Nullable < Carta::Lib::VectorGraphics::VGList > ();

    auto renderSize = m_renderService-> outputSize();
    m_wcsGridRenderer-> setOutputSize( renderSize );

    int leftMargin = 50;
    int rightMargin = 10;
    int bottomMargin = 50;
    int topMargin = 10;

    QRectF outputRect( leftMargin, topMargin,
                       renderSize.width() - leftMargin - rightMargin,
                       renderSize.height() - topMargin - bottomMargin );
    QRectF inputRect(
        m_renderService-> screen2img( outputRect.topLeft() ),
        m_renderService-> screen2img( outputRect.bottomRight() ) );

    m_wcsGridRenderer-> setImageRect( inputRect );
    m_wcsGridRenderer-> setOutputRect( outputRect );

//    m_igSync-> startAll();
    m_syncSvc-> startImage();
    m_syncSvc-> startGrid();
} // updateGridAfterPanZoom
Beispiel #2
0
CPetConversations::CPetConversations() : CPetSection(),
		_logChanged(false), _field418(0), _npcNum(-1),
		_rect1(22, 352, 598, 478) {
	Rect logRect(85, 18, 513, 87);
	logRect.translate(20, 350);
	_log.setBounds(logRect);
	_log.resize(50);
	_log.setHasBorder(false);
	_log.setColor(getColor(2));
	_log.setup();
	_log.addLine("Welcome to your PET v1.0a");

	Rect inputRect(85, 95, 513, 135);
	inputRect.translate(20, 350);
	_textInput.setBounds(inputRect);
	_textInput.setHasBorder(false);
	_textInput.resize(2);
	_textInput.setMaxCharsPerLine(74);
	_textInput.setColor(getColor(0));
	_textInput.setup();

	_npcLevels[0] = _npcLevels[1] = _npcLevels[2] = 0;
}