[gtkmm-documentation] Adapt to the Pango::Layout::get_iter(iter) deprecation.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm-documentation] Adapt to the Pango::Layout::get_iter(iter) deprecation.
- Date: Wed, 26 Jan 2011 10:59:51 +0000 (UTC)
commit fe1851d4897088b7821933b5cef237fe4e451b81
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Jan 26 11:58:29 2011 +0100
Adapt to the Pango::Layout::get_iter(iter) deprecation.
* examples/book/printing/advanced/printformoperation.cc:
* examples/book/printing/simple/printformoperation.cc: Use the get_iter()
method that just returns the iter.
ChangeLog | 8 ++++++++
.../book/printing/advanced/printformoperation.cc | 11 +++++------
.../book/printing/simple/printformoperation.cc | 11 +++++------
3 files changed, 18 insertions(+), 12 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8f68ad2..0d6fd94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2011-01-26 Murray Cumming <murrayc murrayc com>
+ Adapt to the Pango::Layout::get_iter(iter) deprecation.
+
+ * examples/book/printing/advanced/printformoperation.cc:
+ * examples/book/printing/simple/printformoperation.cc: Use the get_iter()
+ method that just returns the iter.
+
+2011-01-26 Murray Cumming <murrayc murrayc com>
+
Build: Adapt to a filename change.
* examples/Makefile.am: Mention the new .css file instead of the old rc file.
diff --git a/examples/book/printing/advanced/printformoperation.cc b/examples/book/printing/advanced/printformoperation.cc
index 86ae98b..e497c1e 100644
--- a/examples/book/printing/advanced/printformoperation.cc
+++ b/examples/book/printing/advanced/printformoperation.cc
@@ -120,15 +120,14 @@ void PrintFormOperation::on_draw_page(
cairo_ctx->set_source_rgb(0, 0, 0);
//Render Pango LayoutLines over the Cairo context:
- Pango::LayoutIter iter;
- m_refLayout->get_iter(iter);
+ Pango::LayoutIter iter = m_refLayout->get_iter();
double start_pos = 0;
int line_index = 0;
do
{
- if (line_index >= start_page_line)
+ if(line_index >= start_page_line)
{
Glib::RefPtr<Pango::LayoutLine> layout_line = iter.get_line();
Pango::Rectangle logical_rect = iter.get_line_logical_extents();
@@ -136,18 +135,18 @@ void PrintFormOperation::on_draw_page(
if (line_index == start_page_line)
{
- start_pos = logical_rect.get_y() / 1024.0;
+ start_pos = logical_rect.get_y() / 1024.0;
}
cairo_ctx->move_to(logical_rect.get_x() / 1024.0,
- baseline / 1024.0 - start_pos);
+ baseline / 1024.0 - start_pos);
layout_line->show_in_cairo_context(cairo_ctx);
}
line_index++;
}
- while (line_index < end_page_line && iter.next_line());
+ while(line_index < end_page_line && iter.next_line());
}
Gtk::Widget* PrintFormOperation::on_create_custom_widget()
diff --git a/examples/book/printing/simple/printformoperation.cc b/examples/book/printing/simple/printformoperation.cc
index 2c36ccb..eed6eac 100644
--- a/examples/book/printing/simple/printformoperation.cc
+++ b/examples/book/printing/simple/printformoperation.cc
@@ -112,15 +112,14 @@ void PrintFormOperation::on_draw_page(
cairo_ctx->set_source_rgb(0, 0, 0);
//Render Pango LayoutLines over the Cairo context:
- Pango::LayoutIter iter;
- m_refLayout->get_iter(iter);
+ Pango::LayoutIter iter = m_refLayout->get_iter();
double start_pos = 0;
int line_index = 0;
do
{
- if (line_index >= start_page_line)
+ if(line_index >= start_page_line)
{
Glib::RefPtr<Pango::LayoutLine> layout_line = iter.get_line();
Pango::Rectangle logical_rect = iter.get_line_logical_extents();
@@ -128,17 +127,17 @@ void PrintFormOperation::on_draw_page(
if (line_index == start_page_line)
{
- start_pos = logical_rect.get_y() / 1024.0;
+ start_pos = logical_rect.get_y() / 1024.0;
}
cairo_ctx->move_to(logical_rect.get_x() / 1024.0,
- baseline / 1024.0 - start_pos);
+ baseline / 1024.0 - start_pos);
layout_line->show_in_cairo_context(cairo_ctx);
}
line_index++;
}
- while (line_index < end_page_line && iter.next_line());
+ while(line_index < end_page_line && iter.next_line());
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]