<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>yunglee-GTK 相關主題</title>
<link>http://blog.roodo.com/yunglee/archives/cat_381823.html</link>
<description></description>
<language>zh-tw</language>
<generator>Roodo Blog System</generator>
<copyright>All Rights Reserved</copyright>
<atom:link href="http://blog.roodo.com/yunglee/archives/cat_381823.xml" rel="self" type="application/rss+xml" />
<item>
	<title>Scicos 文字顯現問題</title>
	<description><![CDATA[
			若使用 pango 繪, 則顏色選擇必須注意, 否則  Scicos  中之 Other 圖版 Text 無法畫出字來原因為前景 和背景顏色相同.  已解決 (參考 ：http://mail.gnome.org/archives/gtk-app-devel-list/2004-February/msg00322.html)  &nbsp;GdkGC *gc 需設定如下： void pango_draw_text(BCG *ScilabXgc,GdkDrawable *drawable,int xx, int yy,char *string){&nbsp;PangoLayout *pl;// PangoFontDescription *font_desc//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = pango_font_description_from_string (&quot;arial black 12&quot;);//&nbsp;&nbsp;&nbsp; gtk_widget_modify_font (ScilabXgc-&gt;drawing, font_desc);&nbsp;//&nbsp;&nbsp; pango_font_description_free (font_desc);&nbsp;pl = gtk_widget_create_pango_layout(ScilabXgc-&gt;drawing,NULL);&nbsp;pango_layout_context_changed(pl);&nbsp;pango_layout_set_text(pl, string,-1);&nbsp;GdkGC *gc;&nbsp;gc = gdk_gc_new(drawable);&nbsp;gdk_draw_layout( drawable,gc,xx,yy,pl);&nbsp;g_object_unref(gc);&nbsp;g_object_unref(pl);}////////////
		]]>
	</description>
	<content:encoded><![CDATA[
			<p><strike>若使用 pango 繪, 則顏色選擇必須注意, 否則  Scicos  中之 Other 圖版 Text 無法畫出字來原因為前景 和背景顏色相同</strike>.  </p><p><font color="#ff0000">已解決 (參考 ：<a href="http://mail.gnome.org/archives/gtk-app-devel-list/2004-February/msg00322.html">http://mail.gnome.org/archives/gtk-app-devel-list/2004-February/msg00322.html</a>)</font>  </p><p>&nbsp;<font color="#ff0000">GdkGC *gc 需設定如下：</font> </p><p>void pango_draw_text(BCG *ScilabXgc,GdkDrawable *drawable,int xx, int yy,char *string)<br />{<br />&nbsp;PangoLayout *pl;<br /><br />// PangoFontDescription *font_desc<br />//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = pango_font_description_from_string (&quot;arial black 12&quot;);<br />//&nbsp;&nbsp;&nbsp; gtk_widget_modify_font (ScilabXgc-&gt;drawing, font_desc);<br />&nbsp;//&nbsp;&nbsp; pango_font_description_free (font_desc);<br /><br />&nbsp;pl = gtk_widget_create_pango_layout(ScilabXgc-&gt;drawing,NULL);<br />&nbsp;pango_layout_context_changed(pl);<br />&nbsp;pango_layout_set_text(pl, string,-1);<br />&nbsp;<font color="#ff0000">GdkGC *gc;<br />&nbsp;gc = gdk_gc_new(drawable);</font><br />&nbsp;gdk_draw_layout( drawable,<font color="#ff0000">gc</font>,xx,yy,pl);<br /><font color="#ff0000">&nbsp;g_object_unref(gc);</font><br />&nbsp;g_object_unref(pl);<br />}<br />////////////</p>
		
		]]>
	</content:encoded>
	<link>http://blog.roodo.com/yunglee/archives/3563393.html</link>
	<guid>http://blog.roodo.com/yunglee/archives/3563393.html</guid>
	<category>GTK 相關主題</category>
	<pubDate>Mon, 02 Jul 2007 00:18:42 +0800</pubDate>
</item>
<item>
	<title>在 Scicos 中 使用 文字方塊 (Other 中的 text) 時, 無法顯現 </title>
	<description><![CDATA[
			在 Scicos 中 使用 文字方塊 (Other 中的 text) 時, 無法顯現   但未修改的新下載版沒問題, 可能是 periGTK.c displaystring 修改不完全  
		]]>
	</description>
	<content:encoded><![CDATA[
			在 Scicos 中 使用 文字方塊 (Other 中的 text) 時, 無法顯現   但未修改的新下載版沒問題,<font color="#ff6600"> <strike>可能</strike></font>是 periGTK.c displaystring 修改不完全  
		
		]]>
	</content:encoded>
	<link>http://blog.roodo.com/yunglee/archives/3554167.html</link>
	<guid>http://blog.roodo.com/yunglee/archives/3554167.html</guid>
	<category>GTK 相關主題</category>
	<pubDate>Fri, 29 Jun 2007 21:56:53 +0800</pubDate>
</item>
<item>
	<title>Scilab Windows 和 GTK 版本差異</title>
	<description><![CDATA[
			Scilab GTK 必須使用 libvte 作為終端機模擬程式 (位於 routines\gzvt2) , 以 vte.c 編譯出 zterm 使用。
但 copy 及 paste 似乎不正常。檢查後發現

copy --> 雙擊左 mouse button 或        CTL+shift+C  (與 Windows 不同)
paste--> 同時按左右 mouse  button     CTL+shift+V(與 Windows 不同)


GTK 版上,. 沒有變換語言之選單


whatis.htm 檔案之格式
 arma- Scilab arma library
   要改為
 arma - Scilab arma library 

否則 apropos 指令失敗, (因為使用 gtkhtml, 而非 tclhelp , 會先產生指標檔 )


		]]>
	</description>
	<content:encoded><![CDATA[
			Scilab GTK 必須使用 libvte 作為終端機模擬程式 (位於 routines\gzvt2) , 以 vte.c 編譯出 zterm 使用。<br />
但 copy 及 paste 似乎不正常。檢查後發現<br />
<br />
copy --> 雙擊左 mouse button 或        CTL+shift+C  (與 Windows 不同)<br />
paste--> 同時按左右 mouse  button     CTL+shift+V(與 Windows 不同)<br />
<br />
<br />
GTK 版上,. 沒有變換語言之選單<br />
<br />
<br />
whatis.htm 檔案之格式<br />
<dd> <A HREF="arma.htm">arma- Scilab arma library</A></dd><br />
   要改為<br />
<dd> <A HREF="arma.htm">arma</A> - Scilab arma library </dd><br />
<br />
否則 apropos 指令失敗, (因為使用 gtkhtml, 而非 tclhelp , 會先產生指標檔 )<br />
<br />

		
		]]>
	</content:encoded>
	<link>http://blog.roodo.com/yunglee/archives/3549675.html</link>
	<guid>http://blog.roodo.com/yunglee/archives/3549675.html</guid>
	<category>GTK 相關主題</category>
	<pubDate>Fri, 29 Jun 2007 00:58:17 +0800</pubDate>
</item>
<item>
	<title>GTK 繪出中文字問題</title>
	<description><![CDATA[
			// graphics\periGTK.c
// 使用  gdk_draw_layout 取代 gdk_draw_text
void outgtextP(BCG *ScilabXgc,int xx, int yy,char *string)
{
 PangoLayout *pl;
 pl = gtk_widget_create_pango_layout(ScilabXgc->drawing,NULL);
 pango_layout_context_changed(pl);
 pango_layout_set_text(pl, string,-1);
 gdk_draw_layout( ScilabXgc->pixmap,ScilabXgc->wgc,xx,yy,pl);
 g_object_unref(pl);
}
///////////////////////////

void C2F(displaystring)(char *string, integer *x, integer *y, integer *v1, integer *flag, integer *v6, integer *v7, double *angle, double *dv2, double *dv3, double *dv4)
{ 
  gint lbearing, rbearing, iascent, idescent, iwidth;
  gdk_string_extents(ScilabXgc->font,"中", &lbearing, &rbearing,
		     &iwidth, &iascent, &idescent);
 
...
      if ( ScilabXgc->Cdrawable == ScilabXgc->drawing->window) 
           outgtextP(ScilabXgc,*x, *y- iascent-idescent, string) ;
//	gdk_draw_text(ScilabXgc->pixmap,ScilabXgc->font,ScilabXgc->wgc, 
//		      *x, *y - idescent , string, strlen(string));

		]]>
	</description>
	<content:encoded><![CDATA[
			// graphics\periGTK.c<br />
// 使用  gdk_draw_layout 取代 gdk_draw_text<br />
void outgtextP(BCG *ScilabXgc,int xx, int yy,char *string)<br />
{<br />
 PangoLayout *pl;<br />
 pl = gtk_widget_create_pango_layout(ScilabXgc->drawing,NULL);<br />
 pango_layout_context_changed(pl);<br />
 pango_layout_set_text(pl, string,-1);<br />
 gdk_draw_layout( ScilabXgc->pixmap,ScilabXgc->wgc,xx,yy,pl);<br />
 g_object_unref(pl);<br />
}<br />
///////////////////////////<br />
<br />
void C2F(displaystring)(char *string, integer *x, integer *y, integer *v1, integer *flag, integer *v6, integer *v7, double *angle, double *dv2, double *dv3, double *dv4)<br />
{ <br />
  gint lbearing, rbearing, iascent, idescent, iwidth;<br />
  gdk_string_extents(ScilabXgc->font,"中", &lbearing, &rbearing,<br />
		     &iwidth, &iascent, &idescent);<br />
 <br />
...<br />
      if ( ScilabXgc->Cdrawable == ScilabXgc->drawing->window) <br />
           outgtextP(ScilabXgc,*x, *y- iascent-idescent, string) ;<br />
//	gdk_draw_text(ScilabXgc->pixmap,ScilabXgc->font,ScilabXgc->wgc, <br />
//		      *x, *y - idescent , string, strlen(string));<br />

		
		]]>
	</content:encoded>
	<link>http://blog.roodo.com/yunglee/archives/3536603.html</link>
	<guid>http://blog.roodo.com/yunglee/archives/3536603.html</guid>
	<category>GTK 相關主題</category>
	<pubDate>Wed, 27 Jun 2007 00:01:53 +0800</pubDate>
</item>
<item>
	<title>GTK 中文相關資料</title>
	<description><![CDATA[
			GTK+ 2.0 教程

用Ruby 與GTK+

天下维客

http://www.gtk.org/tutorial/

ICONV 轉碼

GTK 中文教材 &nbsp;
Linux 国际化本地化和中文化 

FreeBSD Chinese HOWTO

		]]>
	</description>
	<content:encoded><![CDATA[
			<a href ="http://docs.huihoo.com/gnu/gtk2-tut/book1.html">GTK+ 2.0 教程</a><br />
<br />
<a href ="http://info.sayya.org/~sjh/sjh_rubygtk.pdf">用Ruby 與GTK+</a><br />
<br />
<a href ="http://www.allwiki.com/wiki/GTK">天下维客</a><br />
<br />
<a href ="http://www.gtk.org/tutorial/">http://www.gtk.org/tutorial/</a><br />
<br />
<a href ="http://www.cnblogs.com/cy163/archive/2007/06/19/789711.html">ICONV 轉碼</a><br />
<br />
<a href="http://203.64.187.41/gtk/GTK-Index.html" title="GTK "><br />GTK 中文教材 </a>&nbsp;<br /><br />
<a href="http://www.linuxforum.net/doc/i18n-new.html">Linux 国际化本地化和中文化</a> <br />
<br />
<a href="http://netlab.cse.yzu.edu.tw/~statue/freebsd/zh-tut/index.html">FreeBSD Chinese HOWTO</a><br />

		
		]]>
	</content:encoded>
	<link>http://blog.roodo.com/yunglee/archives/3535529.html</link>
	<guid>http://blog.roodo.com/yunglee/archives/3535529.html</guid>
	<category>GTK 相關主題</category>
	<pubDate>Tue, 26 Jun 2007 19:57:46 +0800</pubDate>
</item>
</channel>
</rss>