当前位置: 首页>>代码示例>>C++>>正文


C++ AffineTransform::isSingularity方法代码示例

本文整理汇总了C++中AffineTransform::isSingularity方法的典型用法代码示例。如果您正苦于以下问题:C++ AffineTransform::isSingularity方法的具体用法?C++ AffineTransform::isSingularity怎么用?C++ AffineTransform::isSingularity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AffineTransform的用法示例。


在下文中一共展示了AffineTransform::isSingularity方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: recalculateCoordinates

void DrawableComposite::recalculateCoordinates (Expression::Scope* scope)
{
    Point<float> resolved[3];
    bounds.resolveThreePoints (resolved, scope);

    const Rectangle<float> content (getContentArea().resolve (scope));

    AffineTransform t (AffineTransform::fromTargetPoints (content.getX(),     content.getY(),      resolved[0].x, resolved[0].y,
                       content.getRight(), content.getY(),      resolved[1].x, resolved[1].y,
                       content.getX(),     content.getBottom(), resolved[2].x, resolved[2].y));

    if (t.isSingularity())
        t = AffineTransform::identity;

    setTransform (t);
}
开发者ID:pingdynasty,项目名称:BlipZones,代码行数:16,代码来源:juce_DrawableComposite.cpp

示例2: refreshTransformFromBounds

//==============================================================================
void DrawableImage::refreshTransformFromBounds()
{
    if (! image.isNull())
    {
        Point<float> resolved[3];
        bounds.resolveThreePoints (resolved, getParent());

        const Point<float> tr (resolved[0] + (resolved[1] - resolved[0]) / (float) image.getWidth());
        const Point<float> bl (resolved[0] + (resolved[2] - resolved[0]) / (float) image.getHeight());

        AffineTransform t (AffineTransform::fromTargetPoints (resolved[0].getX(), resolved[0].getY(),
                                                              tr.getX(), tr.getY(),
                                                              bl.getX(), bl.getY()));

        if (! t.isSingularity())
            setTransform (t);
    }
}
开发者ID:Labmind,项目名称:GUI,代码行数:19,代码来源:juce_DrawableImage.cpp

示例3: recalculateCoordinates

void DrawableImage::recalculateCoordinates (Expression::Scope* scope)
{
    if (image.isValid())
    {
        Point<float> resolved[3];
        bounds.resolveThreePoints (resolved, scope);

        const Point<float> tr (resolved[0] + (resolved[1] - resolved[0]) / (float) image.getWidth());
        const Point<float> bl (resolved[0] + (resolved[2] - resolved[0]) / (float) image.getHeight());

        AffineTransform t (AffineTransform::fromTargetPoints (resolved[0].x, resolved[0].y,
                                                              tr.x, tr.y,
                                                              bl.x, bl.y));

        if (t.isSingularity())
            t = AffineTransform::identity;

        setTransform (t);
    }
}
开发者ID:sonic59,项目名称:JuceEditor,代码行数:20,代码来源:juce_DrawableImage.cpp


注:本文中的AffineTransform::isSingularity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。