diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-0 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-10 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-2 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-4 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-6 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-8 | 6 | ||||
-rw-r--r-- | examples/viewer-ft2.c | 18 | ||||
-rw-r--r-- | examples/viewer-win32.c | 18 |
9 files changed, 55 insertions, 23 deletions
@@ -59,8 +59,12 @@ Sun Aug 20 13:45:08 2000 Owen Taylor <otaylor@redhat.com> * modules/basic/makefile.mingw.in: New file. Add rule for basic-ft2. Add FreeType2 CFLAGS and LIBS. - * examples/viewer-win32.c (read_file): Fix error messages. + * examples/viewer-win32.c: Replace division or multiplication with + 1000 (which was the old PANGO_SCALE value) to use PANGO_SCALE and + PANGO_PIXELS instead. + (read_file): Fix error messages. (draw): Get HDC from GDK once for all paragraphs. + * examples/viewer-win32.c: * examples/viewer-ft2.c: New file. The FT_Bitmap (256-level bitmap) produced by the FreeType2 backend is copied to the diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0 index 0064c277..7b433974 100644 --- a/ChangeLog.pre-1-0 +++ b/ChangeLog.pre-1-0 @@ -59,8 +59,12 @@ Sun Aug 20 13:45:08 2000 Owen Taylor <otaylor@redhat.com> * modules/basic/makefile.mingw.in: New file. Add rule for basic-ft2. Add FreeType2 CFLAGS and LIBS. - * examples/viewer-win32.c (read_file): Fix error messages. + * examples/viewer-win32.c: Replace division or multiplication with + 1000 (which was the old PANGO_SCALE value) to use PANGO_SCALE and + PANGO_PIXELS instead. + (read_file): Fix error messages. (draw): Get HDC from GDK once for all paragraphs. + * examples/viewer-win32.c: * examples/viewer-ft2.c: New file. The FT_Bitmap (256-level bitmap) produced by the FreeType2 backend is copied to the diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 0064c277..7b433974 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -59,8 +59,12 @@ Sun Aug 20 13:45:08 2000 Owen Taylor <otaylor@redhat.com> * modules/basic/makefile.mingw.in: New file. Add rule for basic-ft2. Add FreeType2 CFLAGS and LIBS. - * examples/viewer-win32.c (read_file): Fix error messages. + * examples/viewer-win32.c: Replace division or multiplication with + 1000 (which was the old PANGO_SCALE value) to use PANGO_SCALE and + PANGO_PIXELS instead. + (read_file): Fix error messages. (draw): Get HDC from GDK once for all paragraphs. + * examples/viewer-win32.c: * examples/viewer-ft2.c: New file. The FT_Bitmap (256-level bitmap) produced by the FreeType2 backend is copied to the diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index 0064c277..7b433974 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -59,8 +59,12 @@ Sun Aug 20 13:45:08 2000 Owen Taylor <otaylor@redhat.com> * modules/basic/makefile.mingw.in: New file. Add rule for basic-ft2. Add FreeType2 CFLAGS and LIBS. - * examples/viewer-win32.c (read_file): Fix error messages. + * examples/viewer-win32.c: Replace division or multiplication with + 1000 (which was the old PANGO_SCALE value) to use PANGO_SCALE and + PANGO_PIXELS instead. + (read_file): Fix error messages. (draw): Get HDC from GDK once for all paragraphs. + * examples/viewer-win32.c: * examples/viewer-ft2.c: New file. The FT_Bitmap (256-level bitmap) produced by the FreeType2 backend is copied to the diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index 0064c277..7b433974 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -59,8 +59,12 @@ Sun Aug 20 13:45:08 2000 Owen Taylor <otaylor@redhat.com> * modules/basic/makefile.mingw.in: New file. Add rule for basic-ft2. Add FreeType2 CFLAGS and LIBS. - * examples/viewer-win32.c (read_file): Fix error messages. + * examples/viewer-win32.c: Replace division or multiplication with + 1000 (which was the old PANGO_SCALE value) to use PANGO_SCALE and + PANGO_PIXELS instead. + (read_file): Fix error messages. (draw): Get HDC from GDK once for all paragraphs. + * examples/viewer-win32.c: * examples/viewer-ft2.c: New file. The FT_Bitmap (256-level bitmap) produced by the FreeType2 backend is copied to the diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index 0064c277..7b433974 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -59,8 +59,12 @@ Sun Aug 20 13:45:08 2000 Owen Taylor <otaylor@redhat.com> * modules/basic/makefile.mingw.in: New file. Add rule for basic-ft2. Add FreeType2 CFLAGS and LIBS. - * examples/viewer-win32.c (read_file): Fix error messages. + * examples/viewer-win32.c: Replace division or multiplication with + 1000 (which was the old PANGO_SCALE value) to use PANGO_SCALE and + PANGO_PIXELS instead. + (read_file): Fix error messages. (draw): Get HDC from GDK once for all paragraphs. + * examples/viewer-win32.c: * examples/viewer-ft2.c: New file. The FT_Bitmap (256-level bitmap) produced by the FreeType2 backend is copied to the diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index 0064c277..7b433974 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -59,8 +59,12 @@ Sun Aug 20 13:45:08 2000 Owen Taylor <otaylor@redhat.com> * modules/basic/makefile.mingw.in: New file. Add rule for basic-ft2. Add FreeType2 CFLAGS and LIBS. - * examples/viewer-win32.c (read_file): Fix error messages. + * examples/viewer-win32.c: Replace division or multiplication with + 1000 (which was the old PANGO_SCALE value) to use PANGO_SCALE and + PANGO_PIXELS instead. + (read_file): Fix error messages. (draw): Get HDC from GDK once for all paragraphs. + * examples/viewer-win32.c: * examples/viewer-ft2.c: New file. The FT_Bitmap (256-level bitmap) produced by the FreeType2 backend is copied to the diff --git a/examples/viewer-ft2.c b/examples/viewer-ft2.c index a6cbfa55..e077c525 100644 --- a/examples/viewer-ft2.c +++ b/examples/viewer-ft2.c @@ -164,7 +164,9 @@ xy_to_cp (int width, if (height + para->height >= y) { - gboolean result = pango_layout_xy_to_index (para->layout, x * 1000, (y - height) * 1000, + gboolean result = pango_layout_xy_to_index (para->layout, + x * PANGO_SCALE, + (y - height) * PANGO_SCALE, index, NULL); if (result && para_return) *para_return = para; @@ -203,10 +205,10 @@ char_bounds (Paragraph *para, pango_layout_index_to_pos (cur_para->layout, index, &pos); - rect->x = MIN (pos.x, pos.x + pos.width) / 1000; - rect->width = ABS (pos.width) / 1000; - rect->y = height + pos.y / 1000; - rect->height = pos.height / 1000; + rect->x = PANGO_PIXELS (MIN (pos.x, pos.x + pos.width)); + rect->width = PANGO_PIXELS (ABS (pos.width)); + rect->y = height + PANGO_PIXELS (pos.y); + rect->height = PANGO_PIXELS (pos.height); return; } @@ -271,10 +273,10 @@ size_allocate (GtkWidget *layout, pango_layout_set_alignment (para->layout, base_dir == PANGO_DIRECTION_LTR ? PANGO_ALIGN_LEFT : PANGO_ALIGN_RIGHT); - pango_layout_set_width (para->layout, layout->allocation.width * 1000); + pango_layout_set_width (para->layout, layout->allocation.width * PANGO_SCALE); pango_layout_get_extents (para->layout, NULL, &logical_rect); - para->height = logical_rect.height / 1000; + para->height = PANGO_PIXELS (logical_rect.height); height += para->height; } @@ -641,7 +643,7 @@ make_font_selector (void) gtk_box_pack_start (GTK_BOX (hbox), util_hbox, FALSE, FALSE, 0); adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (spin_button)); - adj->value = font_description.size / 1000.; + adj->value = PANGO_PIXELS (font_description.size); adj->lower = 0; adj->upper = 1024; adj->step_increment = 1; diff --git a/examples/viewer-win32.c b/examples/viewer-win32.c index 62086513..cbfb8033 100644 --- a/examples/viewer-win32.c +++ b/examples/viewer-win32.c @@ -160,7 +160,9 @@ xy_to_cp (int width, int x, int y, Paragraph **para_return, int *index) if (height + para->height >= y) { - gboolean result = pango_layout_xy_to_index (para->layout, x * 1000, (y - height) * 1000, + gboolean result = pango_layout_xy_to_index (para->layout, + x * PANGO_SCALE, + (y - height) * PANGO_SCALE, index, NULL); if (result && para_return) *para_return = para; @@ -196,10 +198,10 @@ char_bounds (Paragraph *para, int index, int width, PangoRectangle *rect) pango_layout_index_to_pos (cur_para->layout, index, &pos); - rect->x = MIN (pos.x, pos.x + pos.width) / 1000; - rect->width = ABS (pos.width) / 1000; - rect->y = height + pos.y / 1000; - rect->height = pos.height / 1000; + rect->x = PANGO_PIXELS (MIN (pos.x, pos.x + pos.width)); + rect->width = PANGO_PIXELS (ABS (pos.width)); + rect->y = height + PANGO_PIXELS (pos.y); + rect->height = PANGO_PIXELS (pos.height); } height += cur_para->height; @@ -259,10 +261,10 @@ size_allocate (GtkWidget *layout, GtkAllocation *allocation) pango_layout_set_alignment (para->layout, base_dir == PANGO_DIRECTION_LTR ? PANGO_ALIGN_LEFT : PANGO_ALIGN_RIGHT); - pango_layout_set_width (para->layout, layout->allocation.width * 1000); + pango_layout_set_width (para->layout, layout->allocation.width * PANGO_SCALE); pango_layout_get_extents (para->layout, NULL, &logical_rect); - para->height = logical_rect.height / 1000; + para->height = PANGO_PIXELS (logical_rect.height); height += para->height; } @@ -598,7 +600,7 @@ make_font_selector (void) gtk_box_pack_start (GTK_BOX (hbox), util_hbox, FALSE, FALSE, 0); adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (spin_button)); - adj->value = font_description.size / 1000.; + adj->value = PANGO_PIXELS (font_description.size); adj->lower = 0; adj->upper = 1024; adj->step_increment = 1; |