English 中文(简体)
Newbie: RGB to GTK widget - howto?
原标题:Newbie: Render RGB to GTK widget -- howto?

基本情况: 我想通过德国技术合作公司在气球箱中树立一种欧洲-欧洲合作组织的形象。

我感到沮丧的是德国技术合作公司。

我假定,我应创造出一个能够使图像正确无误的可图领域?

然后,我是否必须绘制该领域的图形背景? 如何?

我的简单看法(甚至没有解决堡垒问题)是:

页: 1

GdkGC     * gc     = NULL;
GtkWidget * window = NULL;
GtkDrawingArea * dpage = NULL;
GtkWidget * page = NULL;

gtk_init( &argc, & argv );

window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
page = gtk_drawing_area_new( );
dpage = GTK_DRAWING_AREA( page );
gtk_widget_set_size_request( page, PAGE_WIDTH, PAGE_HEIGHT );
gc = gdk_gc_new( GTK_DRAWABLE( dpage ) );

gtk_widget_show( window );
gtk_main();

return (EXIT_SUCCESS);

iii

my dpage is apparently not a drawable (though it is a drawing area). I am confused as to a) how do I get/create the graphics context which is required in subsequent function calls? b) am I close to a solution, or am I so completely *#&@& wrong that there is no hope c) a baby steps tutorial. (I started with hello world as my base, so I got that far).

感谢一切帮助。

b)

最佳回答

至少,请通过斜线透视(http://library.gnome.org/devel/gtk-tutorial/stable/c2422.html),如果不是这个部分内容的较大导体。

自您提出问题后,* d 我建议使用高压,如果你已经知道C++的话,你就会发现研制得非常容易。 http://library.gnome.org/devel/gtkmm-tutorial/stable/“rel=“nofollow noreferer” http://library.gnome.org/devel/gtkmm-tutorial/stable/。

问题回答

暂无回答




相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签