本文整理汇总了C++中SkRect::iset方法的典型用法代码示例。如果您正苦于以下问题:C++ SkRect::iset方法的具体用法?C++ SkRect::iset怎么用?C++ SkRect::iset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkRect
的用法示例。
在下文中一共展示了SkRect::iset方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onDelayedSetup
void onDelayedSetup() override {
fBitmap.allocPixels();
fBitmap.setAlphaType(kOpaque_SkAlphaType);
fBitmap.eraseColor(SK_ColorBLACK);
draw_into_bitmap(fBitmap);
fSrcR.iset(0, 0, kWidth, kHeight);
fDstR.iset(0, 0, kWidth, kHeight);
if (fSlightMatrix) {
// want fractional translate
fDstR.offset(SK_Scalar1 / 3, SK_Scalar1 * 5 / 7);
// want enough to create a scale matrix, but not enough to scare
// off our sniffer which tries to see if the matrix is "effectively"
// translate-only.
fDstR.fRight += SK_Scalar1 / (kWidth * 60);
}
}
示例2:
BitmapRectView2() {
make_big_bitmap(&fBitmap);
this->setBGColor(SK_ColorGRAY);
this->resetBounce();
fLimitR.iset(0, 0, fBitmap.width(), fBitmap.height());
fDstR[0] = SkRect::MakeXYWH(20, 20, 600, 200);
fDstR[1] = fDstR[0];
fDstR[1].offset(0, fDstR[0].height() * 5/4);
}
示例3: DrawAroundInvPath
void GrSoftwarePathRenderer::DrawAroundInvPath(GrDrawContext* drawContext,
const GrPaint* paint,
const GrUserStencilSettings* userStencilSettings,
const GrClip& clip,
GrColor color,
const SkMatrix& viewMatrix,
const SkIRect& devClipBounds,
const SkIRect& devPathBounds) {
SkMatrix invert;
if (!viewMatrix.invert(&invert)) {
return;
}
SkRect rect;
if (devClipBounds.fTop < devPathBounds.fTop) {
rect.iset(devClipBounds.fLeft, devClipBounds.fTop,
devClipBounds.fRight, devPathBounds.fTop);
DrawNonAARect(drawContext, paint, userStencilSettings, clip, color,
SkMatrix::I(), rect, invert);
}
if (devClipBounds.fLeft < devPathBounds.fLeft) {
rect.iset(devClipBounds.fLeft, devPathBounds.fTop,
devPathBounds.fLeft, devPathBounds.fBottom);
DrawNonAARect(drawContext, paint, userStencilSettings, clip, color,
SkMatrix::I(), rect, invert);
}
if (devClipBounds.fRight > devPathBounds.fRight) {
rect.iset(devPathBounds.fRight, devPathBounds.fTop,
devClipBounds.fRight, devPathBounds.fBottom);
DrawNonAARect(drawContext, paint, userStencilSettings, clip, color,
SkMatrix::I(), rect, invert);
}
if (devClipBounds.fBottom > devPathBounds.fBottom) {
rect.iset(devClipBounds.fLeft, devPathBounds.fBottom,
devClipBounds.fRight, devClipBounds.fBottom);
DrawNonAARect(drawContext, paint, userStencilSettings, clip, color,
SkMatrix::I(), rect, invert);
}
}
示例4: onOnceBeforeDraw
void onOnceBeforeDraw() override {
make_big_bitmap(&fBitmap);
this->setBGColor(SK_ColorGRAY);
this->resetBounce();
fLimitR.iset(0, 0, fBitmap.width(), fBitmap.height());
fDstR[0] = SkRect::MakeXYWH(20, 20, 600, 200);
fDstR[1] = fDstR[0];
fDstR[1].offset(0, fDstR[0].height() * 5/4);
}
示例5: resetBounce
void resetBounce() {
fSrcR.iset(0, 0, fBitmap.height() * 3, fBitmap.height());
fDX = SK_Scalar1;
}