本文整理汇总了C++中TransformState::getIntegerZoom方法的典型用法代码示例。如果您正苦于以下问题:C++ TransformState::getIntegerZoom方法的具体用法?C++ TransformState::getIntegerZoom怎么用?C++ TransformState::getIntegerZoom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TransformState
的用法示例。
在下文中一共展示了TransformState::getIntegerZoom方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
LineSDFProgram::UniformValues
LineSDFProgram::uniformValues(const RenderLinePaintProperties::PossiblyEvaluated& properties,
float pixelRatio,
const RenderTile& tile,
const TransformState& state,
const std::array<float, 2>& pixelsToGLUnits,
const LinePatternPos& posA,
const LinePatternPos& posB,
float atlasWidth) {
const float widthA = posA.width * properties.get<LineDasharray>().fromScale;
const float widthB = posB.width * properties.get<LineDasharray>().toScale;
std::array<float, 2> scaleA {{
1.0f / tile.id.pixelsToTileUnits(widthA, state.getIntegerZoom()),
-posA.height / 2.0f
}};
std::array<float, 2> scaleB {{
1.0f / tile.id.pixelsToTileUnits(widthB, state.getIntegerZoom()),
-posB.height / 2.0f
}};
return makeValues<LineSDFProgram::UniformValues>(
properties,
tile,
state,
pixelsToGLUnits,
uniforms::u_patternscale_a::Value{ scaleA },
uniforms::u_patternscale_b::Value{ scaleB },
uniforms::u_tex_y_a::Value{ posA.y },
uniforms::u_tex_y_b::Value{ posB.y },
uniforms::u_mix::Value{ properties.get<LineDasharray>().t },
uniforms::u_sdfgamma::Value{ atlasWidth / (std::min(widthA, widthB) * 256.0f * pixelRatio) / 2.0f },
uniforms::u_image::Value{ 0 }
);
}