MCPcopy Create free account
hub / github.com/Snapchat/Valdi / rasterInto

Method rasterInto

valdi/src/valdi/snap_drawing/BridgedView.cpp:36–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36Valdi::Result<Valdi::Void> BridgedView::rasterInto(const Valdi::Ref<Valdi::IBitmap>& bitmap,
37 const Rect& frame,
38 const Matrix& transform,
39 float rasterScaleX,
40 float rasterScaleY) {
41 if (_view == nullptr) {
42 return Valdi::Error("Not view attached");
43 }
44
45 auto valdiFrame = Valdi::Frame(frame.x(), frame.y(), frame.width(), frame.height());
46 Valdi::Matrix valdiTransform;
47 transform.toAffine(&valdiTransform.values[0]);
48 return _view->rasterInto(bitmap, valdiFrame, valdiTransform, rasterScaleX, rasterScaleY);
49}
50
51Valdi::IViewTransaction& BridgedView::getViewTransaction(Valdi::ViewNodeTree* viewNodeTree) const {
52 return viewNodeTree->getCurrentViewTransactionScope().withViewManager(_viewManager).transaction();

Callers

nothing calls this directly

Calls 8

xMethod · 0.80
yMethod · 0.80
toAffineMethod · 0.80
rasterIntoMethod · 0.65
ErrorInterface · 0.50
FrameClass · 0.50
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected