Esempio n. 1
0
void AlignOnRasterVisitor::visitDObject(DObject *object)
{
    IResizable *resizable = m_sceneInspector->resizable(object, m_diagram);
    if (resizable)
        resizable->alignItemSizeToRaster(IResizable::SideRightOrBottom, IResizable::SideRightOrBottom,
                                         2 * RASTER_WIDTH, 2 * RASTER_HEIGHT);
    IMoveable *moveable = m_sceneInspector->moveable(object, m_diagram);
    if (moveable)
        moveable->alignItemPositionToRaster(RASTER_WIDTH, RASTER_HEIGHT);
}
Esempio n. 2
0
void AlignOnRasterVisitor::visitDAnnotation(DAnnotation *annotation)
{
    IMoveable *moveable = m_sceneInspector->moveable(annotation, m_diagram);
    if (moveable)
        moveable->alignItemPositionToRaster(RASTER_WIDTH, RASTER_HEIGHT);
}