Blame c++/freetype/src/layout.h

f4d7d6
#ifndef LAYOUT_H
f4d7d6
#define LAYOUT_H
f4d7d6
f4d7d6
f4d7d6
#include <vector></vector>
f4d7d6
f4d7d6
#include <pangomm.h></pangomm.h>
f4d7d6
f4d7d6
#include "vector.h"
f4d7d6
#include "matrix.h"
f4d7d6
f4d7d6
f4d7d6
class Layout: public Shared {
f4d7d6
public:
f4d7d6
	class Glyph {
f4d7d6
	public:
f4d7d6
		Vector2 position;
f4d7d6
		Vector2 origin;
f4d7d6
		Pair2 bounds;
f4d7d6
		Pango::Glyph glyph_index;
f4d7d6
	};
f4d7d6
	typedef std::vector<glyph> GlyphList;</glyph>
f4d7d6
	
f4d7d6
	class Run {
f4d7d6
	public:
f4d7d6
		Glib::RefPtr<pango::font> font;</pango::font>
f4d7d6
		GlyphList glyphs;
f4d7d6
	};
f4d7d6
	typedef std::vector<run> RunList;</run>
f4d7d6
	
f4d7d6
	class Line {
f4d7d6
	public:
f4d7d6
		Vector2 position;
f4d7d6
		Pair2 bounds;
f4d7d6
		Pair2 logical_bounds;
f4d7d6
		RunList runs;
f4d7d6
	};
f4d7d6
	typedef std::vector<line> LineList;</line>
f4d7d6
f4d7d6
private:
f4d7d6
	bool hinting;
f4d7d6
	bool antialiasing;
f4d7d6
	Pair2 bounds;
f4d7d6
	Pair2 logical_bounds;
f4d7d6
	LineList lines;
f4d7d6
	
f4d7d6
	Layout(const Layout&) = delete;
f4d7d6
	Layout& operator=(const Layout&) = delete;
f4d7d6
f4d7d6
public:
f4d7d6
	explicit Layout(const Glib::RefPtr<pango::layout> &layout);</pango::layout>
f4d7d6
	
f4d7d6
	bool get_hinting() const
f4d7d6
		{ return hinting; }
f4d7d6
	bool get_antialiasing() const
f4d7d6
		{ return antialiasing; }
f4d7d6
	const Pair2& get_bounds() const
f4d7d6
		{ return bounds; }
f4d7d6
	const Pair2& get_logical_bounds() const
f4d7d6
		{ return logical_bounds; }
f4d7d6
	const LineList& get_lines()
f4d7d6
		{ return lines; }
f4d7d6
	
f4d7d6
	static Glib::RefPtr<pango::fontmap> create_fontmap(bool hinting, bool antialiasing);</pango::fontmap>
f4d7d6
};
f4d7d6
f4d7d6
f4d7d6
class TransformedLayout: public Shared {
f4d7d6
public:
f4d7d6
	typedef std::vector<pair2> LineBoundsList;</pair2>
f4d7d6
f4d7d6
private:
f4d7d6
	RefPtr<layout> layout;</layout>
f4d7d6
	Matrix2 spacing_matrix;
f4d7d6
	Matrix2 glyph_matrix;
f4d7d6
	Pair2 bounds;
f4d7d6
	LineBoundsList line_bounds;
f4d7d6
f4d7d6
public:
f4d7d6
	TransformedLayout(
f4d7d6
		const RefPtr<layout> &layout,</layout>
f4d7d6
		const Matrix2 &spacing_matrix,
f4d7d6
		const Matrix2 &glyph_matrix );
f4d7d6
	
f4d7d6
	const RefPtr<layout>& get_layout() const</layout>
f4d7d6
		{ return layout; }
f4d7d6
	const Matrix2& get_spacing_matrix() const
f4d7d6
		{ return spacing_matrix; }
f4d7d6
	const Matrix2& get_glyph_matrix() const
f4d7d6
		{ return glyph_matrix; }
f4d7d6
	const Pair2& get_bounds() const
f4d7d6
		{ return bounds; }
f4d7d6
	const LineBoundsList& get_line_bounds() const
f4d7d6
		{ return line_bounds; }
f4d7d6
};
f4d7d6
f4d7d6
f4d7d6
#endif