本文整理汇总了C++中LLPointer::disableOverSize方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPointer::disableOverSize方法的具体用法?C++ LLPointer::disableOverSize怎么用?C++ LLPointer::disableOverSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLPointer
的用法示例。
在下文中一共展示了LLPointer::disableOverSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleEvent
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLPointer<LLImageRaw> raw = new LLImageRaw;
S32 width = gViewerWindow->getWindowDisplayWidth();
S32 height = gViewerWindow->getWindowDisplayHeight();
F32 ratio = (F32)width / height;
F32 supersample = 1.f;
if (gSavedSettings.getBOOL("HighResSnapshot"))
{
#if 1//SHY_MOD // screenshot improvement
const F32 mult = gSavedSettings.getF32("SHHighResSnapshotScale");
width *= mult;
height *= mult;
static const LLCachedControl<F32> super_sample_scale("SHHighResSnapshotSuperSample",1.f);
supersample = super_sample_scale;
#else //shy_mod
width *= 2;
height *= 2;
#endif //ignore
}
if (gViewerWindow->rawSnapshot(raw,
width,
height,
ratio,
gSavedSettings.getBOOL("RenderUIInSnapshot"),
FALSE,
LLViewerWindow::SNAPSHOT_TYPE_COLOR,
6144,
supersample))
{
LLPointer<LLImageFormatted> formatted;
switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat")))
{
case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG:
formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality"));
break;
case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG:
formatted = new LLImagePNG;
break;
case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP:
formatted = new LLImageBMP;
break;
default:
llwarns << "Unknown Local Snapshot format" << llendl;
return true;
}
formatted->enableOverSize() ;
formatted->encode(raw, 0);
formatted->disableOverSize();
gViewerWindow->saveImageNumbered(formatted, -1);
}
return true;
}
示例2: handleEvent
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLPointer<LLImageRaw> raw = new LLImageRaw;
S32 width = gViewerWindow->getWindowDisplayWidth();
S32 height = gViewerWindow->getWindowDisplayHeight();
if (gSavedSettings.getBOOL("HighResSnapshot"))
{
#if SHY_MOD // screenshot improvement
const F32 mult = gSavedSettings.getF32("SHHighResSnapshotScale");
width *= mult;
height *= mult;
#else //shy_mod
width *= 2;
height *= 2;
#endif //ignore
}
if (gViewerWindow->rawSnapshot(raw,
width,
height,
TRUE,
FALSE,
gSavedSettings.getBOOL("RenderUIInSnapshot"),
FALSE))
{
gViewerWindow->playSnapshotAnimAndSound();
LLPointer<LLImageFormatted> formatted;
switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat")))
{
case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG:
formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality"));
break;
case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG:
formatted = new LLImagePNG;
break;
case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP:
formatted = new LLImageBMP;
break;
default:
llwarns << "Unknown Local Snapshot format" << llendl;
return true;
}
formatted->enableOverSize() ;
formatted->encode(raw, 0);
formatted->disableOverSize();
gViewerWindow->saveImageNumbered(formatted);
}
return true;
}
示例3: handleEvent
bool handleEvent(const LLSD& userdata)
{
LLPointer<LLImageRaw> raw = new LLImageRaw;
S32 width = gViewerWindow->getWindowWidthRaw();
S32 height = gViewerWindow->getWindowHeightRaw();
if (gSavedSettings.getBOOL("HighResSnapshot"))
{
width *= 2;
height *= 2;
}
if (gViewerWindow->rawSnapshot(raw,
width,
height,
TRUE,
FALSE,
gSavedSettings.getBOOL("RenderUIInSnapshot"),
FALSE))
{
gViewerWindow->playSnapshotAnimAndSound();
LLPointer<LLImageFormatted> formatted;
switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat")))
{
case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG:
formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality"));
break;
case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG:
formatted = new LLImagePNG;
break;
case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP:
formatted = new LLImageBMP;
break;
default:
llwarns << "Unknown Local Snapshot format" << llendl;
return true;
}
formatted->enableOverSize() ;
formatted->encode(raw, 0);
formatted->disableOverSize() ;
gViewerWindow->saveImageNumbered(formatted);
}
return true;
}