mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:47:35 +00:00
LibPDF: Convert to east-const to comply with the recent style changes
This commit is contained in:
parent
0a4d8ef98d
commit
612b183703
17 changed files with 120 additions and 120 deletions
|
@ -79,29 +79,29 @@ struct GraphicsState {
|
|||
|
||||
class Renderer {
|
||||
public:
|
||||
static void render(Document&, const Page&, RefPtr<Gfx::Bitmap>);
|
||||
static void render(Document&, Page const&, RefPtr<Gfx::Bitmap>);
|
||||
|
||||
private:
|
||||
Renderer(RefPtr<Document>, const Page&, RefPtr<Gfx::Bitmap>);
|
||||
Renderer(RefPtr<Document>, Page const&, RefPtr<Gfx::Bitmap>);
|
||||
|
||||
void render();
|
||||
|
||||
void handle_command(const Command&);
|
||||
void handle_command(Command const&);
|
||||
#define V(name, snake_name, symbol) \
|
||||
void handle_##snake_name(const Vector<Value>& args);
|
||||
void handle_##snake_name(Vector<Value> const& args);
|
||||
ENUMERATE_COMMANDS(V)
|
||||
#undef V
|
||||
void handle_text_next_line_show_string(const Vector<Value>& args);
|
||||
void handle_text_next_line_show_string_set_spacing(const Vector<Value>& args);
|
||||
void handle_text_next_line_show_string(Vector<Value> const& args);
|
||||
void handle_text_next_line_show_string_set_spacing(Vector<Value> const& args);
|
||||
|
||||
void set_graphics_state_from_dict(NonnullRefPtr<DictObject>);
|
||||
// shift is the manual advance given in the TJ command array
|
||||
void show_text(const String&, float shift = 0.0f);
|
||||
RefPtr<ColorSpace> get_color_space(const Value&);
|
||||
void show_text(String const&, float shift = 0.0f);
|
||||
RefPtr<ColorSpace> get_color_space(Value const&);
|
||||
|
||||
ALWAYS_INLINE const GraphicsState& state() const { return m_graphics_state_stack.last(); }
|
||||
ALWAYS_INLINE GraphicsState const& state() const { return m_graphics_state_stack.last(); }
|
||||
ALWAYS_INLINE GraphicsState& state() { return m_graphics_state_stack.last(); }
|
||||
ALWAYS_INLINE const TextState& text_state() const { return state().text_state; }
|
||||
ALWAYS_INLINE TextState const& text_state() const { return state().text_state; }
|
||||
ALWAYS_INLINE TextState& text_state() { return state().text_state; }
|
||||
|
||||
template<typename T>
|
||||
|
@ -113,11 +113,11 @@ private:
|
|||
template<typename T>
|
||||
ALWAYS_INLINE Gfx::Rect<T> map(Gfx::Rect<T>) const;
|
||||
|
||||
const Gfx::AffineTransform& calculate_text_rendering_matrix();
|
||||
Gfx::AffineTransform const& calculate_text_rendering_matrix();
|
||||
|
||||
RefPtr<Document> m_document;
|
||||
RefPtr<Gfx::Bitmap> m_bitmap;
|
||||
const Page& m_page;
|
||||
Page const& m_page;
|
||||
Gfx::Painter m_painter;
|
||||
|
||||
Gfx::Path m_current_path;
|
||||
|
@ -135,7 +135,7 @@ namespace AK {
|
|||
|
||||
template<>
|
||||
struct Formatter<PDF::LineCapStyle> : Formatter<StringView> {
|
||||
void format(FormatBuilder& builder, const PDF::LineCapStyle& style)
|
||||
void format(FormatBuilder& builder, PDF::LineCapStyle const& style)
|
||||
{
|
||||
switch (style) {
|
||||
case PDF::LineCapStyle::ButtCap:
|
||||
|
@ -153,7 +153,7 @@ struct Formatter<PDF::LineCapStyle> : Formatter<StringView> {
|
|||
|
||||
template<>
|
||||
struct Formatter<PDF::LineJoinStyle> : Formatter<StringView> {
|
||||
void format(FormatBuilder& builder, const PDF::LineJoinStyle& style)
|
||||
void format(FormatBuilder& builder, PDF::LineJoinStyle const& style)
|
||||
{
|
||||
switch (style) {
|
||||
case PDF::LineJoinStyle::Miter:
|
||||
|
@ -171,7 +171,7 @@ struct Formatter<PDF::LineJoinStyle> : Formatter<StringView> {
|
|||
|
||||
template<>
|
||||
struct Formatter<PDF::LineDashPattern> : Formatter<StringView> {
|
||||
void format(FormatBuilder& format_builder, const PDF::LineDashPattern& pattern)
|
||||
void format(FormatBuilder& format_builder, PDF::LineDashPattern const& pattern)
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.append("[");
|
||||
|
@ -191,7 +191,7 @@ struct Formatter<PDF::LineDashPattern> : Formatter<StringView> {
|
|||
|
||||
template<>
|
||||
struct Formatter<PDF::TextRenderingMode> : Formatter<StringView> {
|
||||
void format(FormatBuilder& builder, const PDF::TextRenderingMode& style)
|
||||
void format(FormatBuilder& builder, PDF::TextRenderingMode const& style)
|
||||
{
|
||||
switch (style) {
|
||||
case PDF::TextRenderingMode::Fill:
|
||||
|
@ -224,7 +224,7 @@ struct Formatter<PDF::TextRenderingMode> : Formatter<StringView> {
|
|||
|
||||
template<>
|
||||
struct Formatter<PDF::TextState> : Formatter<StringView> {
|
||||
void format(FormatBuilder& format_builder, const PDF::TextState& state)
|
||||
void format(FormatBuilder& format_builder, PDF::TextState const& state)
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.append("TextState {\n");
|
||||
|
@ -245,7 +245,7 @@ struct Formatter<PDF::TextState> : Formatter<StringView> {
|
|||
|
||||
template<>
|
||||
struct Formatter<PDF::GraphicsState> : Formatter<StringView> {
|
||||
void format(FormatBuilder& format_builder, const PDF::GraphicsState& state)
|
||||
void format(FormatBuilder& format_builder, PDF::GraphicsState const& state)
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.append("GraphicsState {\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue