Пример #1
0
 void resized()
 {
     Font font = csPlayerLabel->getFont();
     int width = font.getStringWidth(csPlayerLabel->getText());
     const int offset = 5, fontOffset = 2;
     csPlayerLabel->setBounds(proportionOfWidth(0.17f), proportionOfWidth(0.04f), width, (int)font.getHeight() );
     font.setHeight(16.0000f);
     csPlayerSite->setBounds(0, csPlayerLabel->getHeight() + 20, getWidth(), font.getHeight() + fontOffset);
     csPlayerSource->setBounds(0, csPlayerLabel->getHeight() + 20 + csPlayerSite->getHeight(), getWidth(), font.getHeight() + fontOffset);
     int height = csPlayerLabel->getHeight() + 25 + csPlayerSite->getHeight() + (offset*2);
     csPlayerGroupComponent->setBounds(0, height, getWidth(), 90);
     csPlayerDetailTE->setBounds(fontOffset, height + offset + fontOffset, getWidth() - offset, 80);
     csTeamgroupComponent->setBounds(0, height + 90, getWidth(), 90);
     csTeamTE->setBounds(fontOffset, height + 90 + offset + fontOffset, getWidth() - offset, 80);
     csLicencegroupComponent->setBounds(0, height + 180, getWidth(), 90);
     csLicenceTE->setBounds(fontOffset, height + 180 + offset + fontOffset, getWidth() - offset, 80);
 }
Пример #2
0
    void updateTransform()
    {
        const Point<float> p0 (getDraggerPos(0));
        const Point<float> p1 (getDraggerPos(1));
        const Point<float> p2 (getDraggerPos(2));

        if (p0 != p1 && p1 != p2 && p0 != p2)
            content->setTransform (AffineTransform::fromTargetPoints (0, 0, p0.x, p0.y,
                                   (float) content->getWidth(), 0, p1.x, p1.y,
                                   0, (float) content->getHeight(), p2.x, p2.y));
    }