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

Method AppendRectangle

src/pdf/PDFUtils.cpp:185–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185void PDFUtils::AppendRectangle(const Rect& rect, const std::shared_ptr<WriteStream>& content) {
186 float bottom = std::min(rect.bottom, rect.top);
187 PDFUtils::AppendFloat(rect.left, content);
188 content->writeText(" ");
189 PDFUtils::AppendFloat(bottom, content);
190 content->writeText(" ");
191 PDFUtils::AppendFloat(rect.width(), content);
192 content->writeText(" ");
193 PDFUtils::AppendFloat(rect.height(), content);
194 content->writeText(" re\n");
195}
196
197void PDFUtils::ApplyGraphicState(int objectIndex, const std::shared_ptr<WriteStream>& content) {
198 PDFWriteResourceName(content, PDFResourceType::ExtGState, objectIndex);

Callers

nothing calls this directly

Calls 3

writeTextMethod · 0.80
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected