[pangomm] Attributes: Add create_attr_foreground/background_alpha().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pangomm] Attributes: Add create_attr_foreground/background_alpha().
- Date: Sun, 29 Nov 2015 19:58:22 +0000 (UTC)
commit 5d62abbf87e140ee67636f73d4114162fc83154b
Author: Murray Cumming <murrayc murrayc com>
Date: Sun Nov 29 20:49:44 2015 +0100
Attributes: Add create_attr_foreground/background_alpha().
Wrapping new API in pango.
pango/src/attributes.ccg | 10 ++++++++++
pango/src/attributes.hg | 10 ++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/pango/src/attributes.ccg b/pango/src/attributes.ccg
index 378ffed..f7ecc64 100644
--- a/pango/src/attributes.ccg
+++ b/pango/src/attributes.ccg
@@ -94,6 +94,16 @@ AttrColor Attribute::create_attr_background(guint16 red, guint16 green, guint16
return Glib::wrap((PangoAttrColor*)pango_attr_background_new(red, green, blue));
}
+AttrInt Attribute::create_attr_foreground_alpha(guint16 alpha)
+{
+ return Glib::wrap((PangoAttrInt*)pango_attr_foreground_alpha_new(alpha));
+}
+
+AttrInt Attribute::create_attr_background_alpha(guint16 alpha)
+{
+ return Glib::wrap((PangoAttrInt*)pango_attr_background_alpha_new(alpha));
+}
+
AttrInt Attribute::create_attr_size(int size)
{
return Glib::wrap((PangoAttrInt*)pango_attr_size_new(size));
diff --git a/pango/src/attributes.hg b/pango/src/attributes.hg
index d07d71d..14f8a9b 100644
--- a/pango/src/attributes.hg
+++ b/pango/src/attributes.hg
@@ -146,6 +146,16 @@ public:
*/
static AttrColor create_attr_background(guint16 red, guint16 green, guint16 blue);
+ /** Create a new foreground alpha attribute.
+ * @param alpha The alpha value, between 1 and 65536.
+ */
+ static AttrInt create_attr_foreground_alpha(guint16 alpha);
+
+ /** Create a new background alpha attribute.
+ * @param alpha The alpha value, between 1 and 65536.
+ */
+ static AttrInt create_attr_background_alpha(guint16 alpha);
+
/** Create a new font-size attribute.
* @param size The font size, in 1000ths of a point.
* @return An attribute of type AttrInt.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]