| 97 | } |
| 98 | |
| 99 | void HitTestContext::drawShape(std::shared_ptr<Shape> shape, const MCState& state, |
| 100 | const Fill& fill) { |
| 101 | DEBUG_ASSERT(shape != nullptr); |
| 102 | Point local = {}; |
| 103 | if (!GetLocalPoint(state.matrix, deviceX, deviceY, &local)) { |
| 104 | return; |
| 105 | } |
| 106 | if (shapeHitTest) { |
| 107 | auto path = shape->getPath(); |
| 108 | if (!path.contains(local.x, local.y)) { |
| 109 | return; |
| 110 | } |
| 111 | } else { |
| 112 | auto bounds = shape->getBounds(); |
| 113 | if (!bounds.contains(local.x, local.y)) { |
| 114 | return; |
| 115 | } |
| 116 | } |
| 117 | if (checkClipAndFill(state.clip, fill, local)) { |
| 118 | hit = true; |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | void HitTestContext::drawImage(std::shared_ptr<Image> image, const SamplingOptions&, |
| 123 | const MCState& state, const Fill& fill) { |
nothing calls this directly
no test coverage detected