MCPcopy Create free account
hub / github.com/Tencent/tgfx / drawImageRect

Method drawImageRect

src/core/HitTestContext.cpp:135–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135void HitTestContext::drawImageRect(std::shared_ptr<Image>, const Rect&, const Rect& dstRect,
136 const SamplingOptions&, const MCState& state, const Fill& fill,
137 SrcRectConstraint) {
138 // Images are always checked against their bounding box.
139 Point local = {};
140 if (!GetLocalPoint(state.matrix, deviceX, deviceY, &local)) {
141 return;
142 }
143 if (dstRect.contains(local.x, local.y) && checkClipAndFill(state.clip, fill, local)) {
144 hit = true;
145 }
146}
147
148void HitTestContext::drawGlyphRunList(std::shared_ptr<GlyphRunList> glyphRunList,
149 const MCState& state, const Fill& fill,

Callers

nothing calls this directly

Calls 2

GetLocalPointFunction · 0.85
containsMethod · 0.45

Tested by

no test coverage detected