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


C++ BitmapImage::EnableFileMonitor方法代码示例

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


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

示例1: UpdateSettings

    void UpdateSettings()
    {
        bitmapImage.SetPath(data->GetString(TEXT("path")));
        bitmapImage.EnableFileMonitor(data->GetInt(TEXT("monitor"), 0) == 1);
        bitmapImage.Init();

        //------------------------------------

        opacity = data->GetInt(TEXT("opacity"), 100);
        color = data->GetInt(TEXT("color"), 0xFFFFFFFF);
        if(opacity > 100)
            opacity = 100;

        bool bNewUseColorKey = data->GetInt(TEXT("useColorKey"), 0) != 0;
        keyColor        = data->GetInt(TEXT("keyColor"), 0xFFFFFFFF);
        keySimilarity   = data->GetInt(TEXT("keySimilarity"), 10);
        keyBlend        = data->GetInt(TEXT("keyBlend"), 0);

        bUseColorKey = bNewUseColorKey;
    }
开发者ID:asgeirom,项目名称:OBS,代码行数:20,代码来源:BitmapImageSource.cpp

示例2: UpdateSettings

    void UpdateSettings()
    {
        for(UINT i=0; i<bitmapImages.Num(); i++)
            delete bitmapImages[i];
        bitmapImages.Clear();

        //------------------------------------

        bool bFirst = true;

        StringList bitmapList;
        data->GetStringList(TEXT("bitmap"), bitmapList);
        for(UINT i=0; i<bitmapList.Num(); i++)
        {
            String &strBitmap = bitmapList[i];
            if(strBitmap.IsEmpty())
            {
                AppWarning(TEXT("BitmapTransitionSource::UpdateSettings: Empty path"));
                continue;
            }

            BitmapImage *bitmapImage = new BitmapImage;
            bitmapImage->SetPath(strBitmap);
            bitmapImage->EnableFileMonitor(false);
            bitmapImage->Init();

            if(bFirst)
            {
                fullSize = bitmapImage->GetSize();
                baseAspect = double(fullSize.x)/double(fullSize.y);
                bFirst = false;
            }

            bitmapImages << bitmapImage;
        }

        //------------------------------------

        transitionTime = data->GetFloat(TEXT("transitionTime"));
        if(transitionTime < MIN_TRANSITION_TIME)
            transitionTime = MIN_TRANSITION_TIME;
        else if(transitionTime > MAX_TRANSITION_TIME)
            transitionTime = MAX_TRANSITION_TIME;

        //------------------------------------

        bFadeInOnly = data->GetInt(TEXT("fadeInOnly"), 1) != 0;
        bDisableFading = data->GetInt(TEXT("disableFading")) != 0;
        bRandomize = data->GetInt(TEXT("randomize")) != 0;

        //------------------------------------

        curTransitionTime = 0.0f;
        curTexture = 0;

        if(bRandomize)
        {
            srand( (unsigned)time( NULL ) );
            if(bitmapImages.Num() > 1)
            {
                curTexture = lrand(bitmapImages.Num());
                while((nextTexture = lrand(bitmapImages.Num())) == curTexture);
            }
        }
        else
            nextTexture = (curTexture == bitmapImages.Num()-1) ? 0 : curTexture+1;

        bTransitioning = false;
        curFadeValue = 0.0f;
    }
开发者ID:Heli-GitHub,项目名称:OBS,代码行数:70,代码来源:BitmapTransitionSource.cpp


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