File: PangoLayout.h

package info (click to toggle)
storm-lang 0.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 52,028 kB
  • sloc: ansic: 261,471; cpp: 140,432; sh: 14,891; perl: 9,846; python: 2,525; lisp: 2,504; asm: 860; makefile: 678; pascal: 70; java: 52; xml: 37; awk: 12
file content (39 lines) | stat: -rw-r--r-- 973 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once

#include "Gui/TextMgr.h"

#ifdef GUI_GTK

namespace gui {
	namespace pango {

		/**
		 * This file implements functions that are used in both the Cairo text manager and the Skia text
		 * manager, as they both rely on a Pango layout for text rendering.
		 */

		// Create the layout from a Text object.
		PangoLayout *create(PangoContext *context, const Text *text);

		// Free a layout.
		void free(PangoLayout *layout);

		// Update the border.
		void updateBorder(PangoLayout *layout, Size border);

		// Add an effect.
		TextMgr::EffectResult addEffect(PangoLayout *layout, const TextEffect &effect, Str *text);

		// Get the size of the layout.
		Size size(PangoLayout *layout);

		// Get information on each line of the formatted text.
		Array<TextLine *> *lineInfo(PangoLayout *layout, Text *text);

		// Get rectangles that cover some characters.
		Array<Rect> *boundsOf(PangoLayout *layout, Text *text, Str::Iter begin, Str::Iter end);

	}
}

#endif