2021-05-10 20:50:39 +03:00
|
|
|
/*
|
2022-03-05 10:36:05 +03:00
|
|
|
* Copyright (c) 2021-2022, Matthew Olsson <mattco@serenityos.org>
|
2021-05-10 20:50:39 +03:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AK/Format.h>
|
|
|
|
#include <LibGfx/AffineTransform.h>
|
2022-03-24 21:50:37 +03:00
|
|
|
#include <LibGfx/AntiAliasingPainter.h>
|
2021-05-10 20:50:39 +03:00
|
|
|
#include <LibGfx/Bitmap.h>
|
2022-04-09 10:28:38 +03:00
|
|
|
#include <LibGfx/Font/Font.h>
|
|
|
|
#include <LibGfx/Font/FontDatabase.h>
|
2021-05-10 20:50:39 +03:00
|
|
|
#include <LibGfx/Painter.h>
|
|
|
|
#include <LibGfx/Path.h>
|
|
|
|
#include <LibGfx/Point.h>
|
|
|
|
#include <LibGfx/Rect.h>
|
|
|
|
#include <LibGfx/Size.h>
|
2021-05-28 00:01:37 +03:00
|
|
|
#include <LibPDF/ColorSpace.h>
|
2021-05-10 20:50:39 +03:00
|
|
|
#include <LibPDF/Document.h>
|
2022-03-25 08:14:50 +03:00
|
|
|
#include <LibPDF/Fonts/PDFFont.h>
|
2021-05-10 20:50:39 +03:00
|
|
|
#include <LibPDF/Object.h>
|
|
|
|
|
|
|
|
namespace PDF {
|
|
|
|
|
|
|
|
enum class LineCapStyle : u8 {
|
|
|
|
ButtCap = 0,
|
|
|
|
RoundCap = 1,
|
|
|
|
SquareCap = 2,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class LineJoinStyle : u8 {
|
|
|
|
Miter = 0,
|
|
|
|
Round = 1,
|
|
|
|
Bevel = 2,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct LineDashPattern {
|
|
|
|
Vector<int> pattern;
|
|
|
|
int phase;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class TextRenderingMode : u8 {
|
|
|
|
Fill = 0,
|
|
|
|
Stroke = 1,
|
|
|
|
FillThenStroke = 2,
|
|
|
|
Invisible = 3,
|
|
|
|
FillAndClip = 4,
|
|
|
|
StrokeAndClip = 5,
|
|
|
|
FillStrokeAndClip = 6,
|
|
|
|
Clip = 7,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct TextState {
|
2022-03-05 10:36:05 +03:00
|
|
|
float character_spacing { 0.0f };
|
|
|
|
float word_spacing { 0.0f };
|
2021-05-10 20:50:39 +03:00
|
|
|
float horizontal_scaling { 1.0f };
|
|
|
|
float leading { 0.0f };
|
2021-05-28 21:55:51 +03:00
|
|
|
float font_size { 12.0f };
|
2022-03-08 22:10:06 +03:00
|
|
|
RefPtr<PDFFont> font;
|
2021-05-10 20:50:39 +03:00
|
|
|
TextRenderingMode rendering_mode { TextRenderingMode::Fill };
|
|
|
|
float rise { 0.0f };
|
|
|
|
bool knockout { true };
|
|
|
|
};
|
|
|
|
|
2022-11-23 16:03:26 +03:00
|
|
|
struct ClippingPaths {
|
|
|
|
Gfx::Path current;
|
|
|
|
Gfx::Path next;
|
|
|
|
};
|
|
|
|
|
2021-05-10 20:50:39 +03:00
|
|
|
struct GraphicsState {
|
|
|
|
Gfx::AffineTransform ctm;
|
2022-11-23 16:03:26 +03:00
|
|
|
ClippingPaths clipping_paths;
|
2021-05-28 00:01:37 +03:00
|
|
|
RefPtr<ColorSpace> stroke_color_space { DeviceGrayColorSpace::the() };
|
|
|
|
RefPtr<ColorSpace> paint_color_space { DeviceGrayColorSpace::the() };
|
2021-05-10 20:50:39 +03:00
|
|
|
Gfx::Color stroke_color { Gfx::Color::NamedColor::Black };
|
|
|
|
Gfx::Color paint_color { Gfx::Color::NamedColor::Black };
|
|
|
|
float line_width { 1.0f };
|
|
|
|
LineCapStyle line_cap_style { LineCapStyle::ButtCap };
|
|
|
|
LineJoinStyle line_join_style { LineJoinStyle::Miter };
|
|
|
|
float miter_limit { 10.0f };
|
|
|
|
LineDashPattern line_dash_pattern { {}, 0 };
|
|
|
|
TextState text_state {};
|
|
|
|
};
|
|
|
|
|
2022-11-23 16:11:29 +03:00
|
|
|
struct RenderingPreferences {
|
|
|
|
bool show_clipping_paths { false };
|
LibPDF: Add initial image display support
After adding support for XObject Form rendering, the next was to display
XObject images. This commit adds this initial support,
Images come in many shapes and forms: encodings: color spaces, bits per
component, width, height, etc. This initial support is constrained to
the color spaces we currently support, to images that use 8 bits per
component, to images that do *not* use the JPXDecode filter, and that
are not Masks. There are surely other constraints that aren't considered
in this initial support, so expect breakage here and there.
In addition to supporting images, we also support applying an alpha mask
(SMask) on them. Additionally, a new rendering preference allows to skip
image loading and rendering altogether, instead showing an empty
rectangle as a placeholder (useful for when actual images are not
supported). Since RenderingPreferences is becoming a bit more complex,
we add a hash option that will allow us to keep track of different
preferences (e.g., in a HashMap).
2022-11-24 21:01:53 +03:00
|
|
|
bool show_images { true };
|
|
|
|
|
|
|
|
unsigned hash() const
|
|
|
|
{
|
|
|
|
return static_cast<unsigned>(show_clipping_paths) | static_cast<unsigned>(show_images) << 1;
|
|
|
|
}
|
2022-11-23 16:11:29 +03:00
|
|
|
};
|
|
|
|
|
2021-05-10 20:50:39 +03:00
|
|
|
class Renderer {
|
|
|
|
public:
|
LibPDF: Switch to best-effort PDF rendering
The current rendering routine aborts as soon as an error is found during
rendering, which potentially severely limits the contents we show on
screen. Moreover, whenever an error happens the PDFViewer widget shows
an error dialog, and doesn't display the bitmap that has been painted so
far.
This commit improves the situation in both fronts, implementing
rendering now with a best-effort approach. Firstly, execution of
operations isn't halted after an operand results in an error, but
instead execution of all operations is always attempted, and all
collected errors are returned in bulk. Secondly, PDFViewer now always
displays the resulting bitmap, regardless of error being produced or
not. To communicate errors, an on_render_errors callback has been added
so clients can subscribe to these events and handle them as appropriate.
2022-12-14 18:00:40 +03:00
|
|
|
static PDFErrorsOr<void> render(Document&, Page const&, RefPtr<Gfx::Bitmap>, RenderingPreferences preferences);
|
2021-05-10 20:50:39 +03:00
|
|
|
|
|
|
|
private:
|
2022-11-23 16:11:29 +03:00
|
|
|
Renderer(RefPtr<Document>, Page const&, RefPtr<Gfx::Bitmap>, RenderingPreferences);
|
2021-05-10 20:50:39 +03:00
|
|
|
|
LibPDF: Switch to best-effort PDF rendering
The current rendering routine aborts as soon as an error is found during
rendering, which potentially severely limits the contents we show on
screen. Moreover, whenever an error happens the PDFViewer widget shows
an error dialog, and doesn't display the bitmap that has been painted so
far.
This commit improves the situation in both fronts, implementing
rendering now with a best-effort approach. Firstly, execution of
operations isn't halted after an operand results in an error, but
instead execution of all operations is always attempted, and all
collected errors are returned in bulk. Secondly, PDFViewer now always
displays the resulting bitmap, regardless of error being produced or
not. To communicate errors, an on_render_errors callback has been added
so clients can subscribe to these events and handle them as appropriate.
2022-12-14 18:00:40 +03:00
|
|
|
PDFErrorsOr<void> render();
|
2021-05-10 20:50:39 +03:00
|
|
|
|
2022-11-21 08:28:41 +03:00
|
|
|
PDFErrorOr<void> handle_operator(Operator const&, Optional<NonnullRefPtr<DictObject>> = {});
|
2021-05-10 20:50:39 +03:00
|
|
|
#define V(name, snake_name, symbol) \
|
2022-11-21 08:28:41 +03:00
|
|
|
PDFErrorOr<void> handle_##snake_name(Vector<Value> const& args, Optional<NonnullRefPtr<DictObject>> = {});
|
2022-03-26 01:00:11 +03:00
|
|
|
ENUMERATE_OPERATORS(V)
|
2021-05-10 20:50:39 +03:00
|
|
|
#undef V
|
2022-11-21 08:28:41 +03:00
|
|
|
PDFErrorOr<void> handle_text_next_line_show_string(Vector<Value> const& args, Optional<NonnullRefPtr<DictObject>> = {});
|
|
|
|
PDFErrorOr<void> handle_text_next_line_show_string_set_spacing(Vector<Value> const& args, Optional<NonnullRefPtr<DictObject>> = {});
|
2021-05-10 20:50:39 +03:00
|
|
|
|
2022-11-23 16:03:26 +03:00
|
|
|
void begin_path_paint();
|
|
|
|
void end_path_paint();
|
2022-03-06 04:12:58 +03:00
|
|
|
PDFErrorOr<void> set_graphics_state_from_dict(NonnullRefPtr<DictObject>);
|
2022-12-04 21:02:33 +03:00
|
|
|
void show_text(DeprecatedString const&);
|
LibPDF: Add initial image display support
After adding support for XObject Form rendering, the next was to display
XObject images. This commit adds this initial support,
Images come in many shapes and forms: encodings: color spaces, bits per
component, width, height, etc. This initial support is constrained to
the color spaces we currently support, to images that use 8 bits per
component, to images that do *not* use the JPXDecode filter, and that
are not Masks. There are surely other constraints that aren't considered
in this initial support, so expect breakage here and there.
In addition to supporting images, we also support applying an alpha mask
(SMask) on them. Additionally, a new rendering preference allows to skip
image loading and rendering altogether, instead showing an empty
rectangle as a placeholder (useful for when actual images are not
supported). Since RenderingPreferences is becoming a bit more complex,
we add a hash option that will allow us to keep track of different
preferences (e.g., in a HashMap).
2022-11-24 21:01:53 +03:00
|
|
|
PDFErrorOr<NonnullRefPtr<Gfx::Bitmap>> load_image(NonnullRefPtr<StreamObject>);
|
|
|
|
PDFErrorOr<void> show_image(NonnullRefPtr<StreamObject>);
|
|
|
|
void show_empty_image(int width, int height);
|
LibPDF: Refactor parsing of ColorSpaces
ColorSpaces can be specified in two ways: with a stream as operands of
the color space operations (CS/cs), or as a separate PDF object, which
is then referred to by other means (e.g., from Image XObjects and other
entities). These two modes of addressing a ColorSpace are slightly
different and need to be addressed separately. However, the current
implementation embedded the full logic of the first case in the routine
that created ColorSpace objects.
This commit refactors the creation of ColorSpace to support both cases.
First, a new ColorSpaceFamily class encapsulates the static aspects of a
family, like its name or whether color space construction never requires
parameters. Then we define the supported ColorSpaceFamily objects.
On top of this also sit a breakage on how ColorSpaces are created. Two
methods are now offered: one only providing construction of no-argument
color spaces (and thus taking a simple name), and another taking an
ArrayObject, hence used to create ColorSpaces requiring arguments.
Finally, on top of *that* two ways to get a color space in the Renderer
are made available: the first creates a ColorSpace with a name and a
Resources dictionary, and another takes an Object. These model the two
addressing modes described above.
2022-11-24 07:40:24 +03:00
|
|
|
PDFErrorOr<NonnullRefPtr<ColorSpace>> get_color_space_from_resources(Value const&, NonnullRefPtr<DictObject>);
|
|
|
|
PDFErrorOr<NonnullRefPtr<ColorSpace>> get_color_space_from_document(NonnullRefPtr<Object>);
|
2021-05-10 20:50:39 +03:00
|
|
|
|
2021-06-01 21:16:11 +03:00
|
|
|
ALWAYS_INLINE GraphicsState const& state() const { return m_graphics_state_stack.last(); }
|
2021-05-10 20:50:39 +03:00
|
|
|
ALWAYS_INLINE GraphicsState& state() { return m_graphics_state_stack.last(); }
|
2021-06-01 21:16:11 +03:00
|
|
|
ALWAYS_INLINE TextState const& text_state() const { return state().text_state; }
|
2021-05-10 20:50:39 +03:00
|
|
|
ALWAYS_INLINE TextState& text_state() { return state().text_state; }
|
|
|
|
|
|
|
|
template<typename T>
|
|
|
|
ALWAYS_INLINE Gfx::Point<T> map(T x, T y) const;
|
|
|
|
|
|
|
|
template<typename T>
|
|
|
|
ALWAYS_INLINE Gfx::Size<T> map(Gfx::Size<T>) const;
|
|
|
|
|
2021-05-23 22:53:38 +03:00
|
|
|
template<typename T>
|
|
|
|
ALWAYS_INLINE Gfx::Rect<T> map(Gfx::Rect<T>) const;
|
|
|
|
|
2021-06-01 21:16:11 +03:00
|
|
|
Gfx::AffineTransform const& calculate_text_rendering_matrix();
|
LibPDF: Add initial image display support
After adding support for XObject Form rendering, the next was to display
XObject images. This commit adds this initial support,
Images come in many shapes and forms: encodings: color spaces, bits per
component, width, height, etc. This initial support is constrained to
the color spaces we currently support, to images that use 8 bits per
component, to images that do *not* use the JPXDecode filter, and that
are not Masks. There are surely other constraints that aren't considered
in this initial support, so expect breakage here and there.
In addition to supporting images, we also support applying an alpha mask
(SMask) on them. Additionally, a new rendering preference allows to skip
image loading and rendering altogether, instead showing an empty
rectangle as a placeholder (useful for when actual images are not
supported). Since RenderingPreferences is becoming a bit more complex,
we add a hash option that will allow us to keep track of different
preferences (e.g., in a HashMap).
2022-11-24 21:01:53 +03:00
|
|
|
Gfx::AffineTransform calculate_image_space_transformation(int width, int height);
|
2021-05-10 20:50:39 +03:00
|
|
|
|
|
|
|
RefPtr<Document> m_document;
|
|
|
|
RefPtr<Gfx::Bitmap> m_bitmap;
|
2021-06-01 21:16:11 +03:00
|
|
|
Page const& m_page;
|
2021-05-10 20:50:39 +03:00
|
|
|
Gfx::Painter m_painter;
|
2022-03-24 21:50:37 +03:00
|
|
|
Gfx::AntiAliasingPainter m_anti_aliasing_painter;
|
2022-11-23 16:11:29 +03:00
|
|
|
RenderingPreferences m_rendering_preferences;
|
2021-05-10 20:50:39 +03:00
|
|
|
|
2021-05-23 21:43:28 +03:00
|
|
|
Gfx::Path m_current_path;
|
2021-05-10 20:50:39 +03:00
|
|
|
Vector<GraphicsState> m_graphics_state_stack;
|
|
|
|
Gfx::AffineTransform m_text_matrix;
|
|
|
|
Gfx::AffineTransform m_text_line_matrix;
|
|
|
|
|
|
|
|
bool m_text_rendering_matrix_is_dirty { true };
|
|
|
|
Gfx::AffineTransform m_text_rendering_matrix;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace AK {
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct Formatter<PDF::LineCapStyle> : Formatter<StringView> {
|
2021-11-16 03:15:21 +03:00
|
|
|
ErrorOr<void> format(FormatBuilder& builder, PDF::LineCapStyle const& style)
|
2021-05-10 20:50:39 +03:00
|
|
|
{
|
|
|
|
switch (style) {
|
|
|
|
case PDF::LineCapStyle::ButtCap:
|
2022-07-11 23:23:24 +03:00
|
|
|
return builder.put_string("LineCapStyle::ButtCap"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
case PDF::LineCapStyle::RoundCap:
|
2022-07-11 23:23:24 +03:00
|
|
|
return builder.put_string("LineCapStyle::RoundCap"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
case PDF::LineCapStyle::SquareCap:
|
2022-07-11 23:23:24 +03:00
|
|
|
return builder.put_string("LineCapStyle::SquareCap"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct Formatter<PDF::LineJoinStyle> : Formatter<StringView> {
|
2021-11-16 03:15:21 +03:00
|
|
|
ErrorOr<void> format(FormatBuilder& builder, PDF::LineJoinStyle const& style)
|
2021-05-10 20:50:39 +03:00
|
|
|
{
|
|
|
|
switch (style) {
|
|
|
|
case PDF::LineJoinStyle::Miter:
|
2022-07-11 23:23:24 +03:00
|
|
|
return builder.put_string("LineJoinStyle::Miter"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
case PDF::LineJoinStyle::Round:
|
2022-07-11 23:23:24 +03:00
|
|
|
return builder.put_string("LineJoinStyle::Round"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
case PDF::LineJoinStyle::Bevel:
|
2022-07-11 23:23:24 +03:00
|
|
|
return builder.put_string("LineJoinStyle::Bevel"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct Formatter<PDF::LineDashPattern> : Formatter<StringView> {
|
2021-11-16 03:15:21 +03:00
|
|
|
ErrorOr<void> format(FormatBuilder& format_builder, PDF::LineDashPattern const& pattern)
|
2021-05-10 20:50:39 +03:00
|
|
|
{
|
|
|
|
StringBuilder builder;
|
2022-07-11 23:10:18 +03:00
|
|
|
builder.append('[');
|
2021-05-10 20:50:39 +03:00
|
|
|
bool first = true;
|
|
|
|
|
|
|
|
for (auto& i : pattern.pattern) {
|
|
|
|
if (!first)
|
2022-07-11 20:32:29 +03:00
|
|
|
builder.append(", "sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
first = false;
|
|
|
|
builder.appendff("{}", i);
|
|
|
|
}
|
|
|
|
|
|
|
|
builder.appendff("] {}", pattern.phase);
|
2022-12-06 04:12:49 +03:00
|
|
|
return format_builder.put_string(builder.to_deprecated_string());
|
2021-05-10 20:50:39 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct Formatter<PDF::TextRenderingMode> : Formatter<StringView> {
|
2021-11-16 03:15:21 +03:00
|
|
|
ErrorOr<void> format(FormatBuilder& builder, PDF::TextRenderingMode const& style)
|
2021-05-10 20:50:39 +03:00
|
|
|
{
|
|
|
|
switch (style) {
|
|
|
|
case PDF::TextRenderingMode::Fill:
|
2022-07-11 23:23:24 +03:00
|
|
|
return builder.put_string("TextRenderingMode::Fill"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
case PDF::TextRenderingMode::Stroke:
|
2022-07-11 23:23:24 +03:00
|
|
|
return builder.put_string("TextRenderingMode::Stroke"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
case PDF::TextRenderingMode::FillThenStroke:
|
2022-07-11 23:23:24 +03:00
|
|
|
return builder.put_string("TextRenderingMode::FillThenStroke"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
case PDF::TextRenderingMode::Invisible:
|
2022-07-11 23:23:24 +03:00
|
|
|
return builder.put_string("TextRenderingMode::Invisible"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
case PDF::TextRenderingMode::FillAndClip:
|
2022-07-11 23:23:24 +03:00
|
|
|
return builder.put_string("TextRenderingMode::FillAndClip"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
case PDF::TextRenderingMode::StrokeAndClip:
|
2022-07-11 23:23:24 +03:00
|
|
|
return builder.put_string("TextRenderingMode::StrokeAndClip"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
case PDF::TextRenderingMode::FillStrokeAndClip:
|
2022-07-11 23:23:24 +03:00
|
|
|
return builder.put_string("TextRenderingMode::FillStrokeAndClip"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
case PDF::TextRenderingMode::Clip:
|
2022-07-11 23:23:24 +03:00
|
|
|
return builder.put_string("TextRenderingMode::Clip"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct Formatter<PDF::TextState> : Formatter<StringView> {
|
2021-11-16 03:15:21 +03:00
|
|
|
ErrorOr<void> format(FormatBuilder& format_builder, PDF::TextState const& state)
|
2021-05-10 20:50:39 +03:00
|
|
|
{
|
|
|
|
StringBuilder builder;
|
2022-07-11 20:32:29 +03:00
|
|
|
builder.append("TextState {\n"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
builder.appendff(" character_spacing={}\n", state.character_spacing);
|
|
|
|
builder.appendff(" word_spacing={}\n", state.word_spacing);
|
|
|
|
builder.appendff(" horizontal_scaling={}\n", state.horizontal_scaling);
|
|
|
|
builder.appendff(" leading={}\n", state.leading);
|
2021-05-28 21:55:51 +03:00
|
|
|
builder.appendff(" font_size={}\n", state.font_size);
|
2021-05-10 20:50:39 +03:00
|
|
|
builder.appendff(" rendering_mode={}\n", state.rendering_mode);
|
|
|
|
builder.appendff(" rise={}\n", state.rise);
|
|
|
|
builder.appendff(" knockout={}\n", state.knockout);
|
2022-07-11 20:32:29 +03:00
|
|
|
builder.append(" }"sv);
|
2022-12-06 04:12:49 +03:00
|
|
|
return format_builder.put_string(builder.to_deprecated_string());
|
2021-05-10 20:50:39 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct Formatter<PDF::GraphicsState> : Formatter<StringView> {
|
2021-11-16 03:15:21 +03:00
|
|
|
ErrorOr<void> format(FormatBuilder& format_builder, PDF::GraphicsState const& state)
|
2021-05-10 20:50:39 +03:00
|
|
|
{
|
|
|
|
StringBuilder builder;
|
2022-07-11 20:32:29 +03:00
|
|
|
builder.append("GraphicsState {\n"sv);
|
2021-05-10 20:50:39 +03:00
|
|
|
builder.appendff(" ctm={}\n", state.ctm);
|
|
|
|
builder.appendff(" stroke_color={}\n", state.stroke_color);
|
|
|
|
builder.appendff(" paint_color={}\n", state.paint_color);
|
|
|
|
builder.appendff(" line_width={}\n", state.line_width);
|
|
|
|
builder.appendff(" line_cap_style={}\n", state.line_cap_style);
|
|
|
|
builder.appendff(" line_join_style={}\n", state.line_join_style);
|
|
|
|
builder.appendff(" miter_limit={}\n", state.miter_limit);
|
|
|
|
builder.appendff(" line_dash_pattern={}\n", state.line_dash_pattern);
|
|
|
|
builder.appendff(" text_state={}\n", state.text_state);
|
2022-07-11 23:10:18 +03:00
|
|
|
builder.append('}');
|
2022-12-06 04:12:49 +03:00
|
|
|
return format_builder.put_string(builder.to_deprecated_string());
|
2021-05-10 20:50:39 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|