Search:

Type: Posts; User: hikerFreak

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Not true, my friend. Count how many times I said...

    Not true, my friend. Count how many times I said "Thank you" on the post you just suggested.

    Have a nice day, sir.

    ps: for your last answer that is missing a "thank you", please see this
  2. ... and what is the correct way of doing it then?...

    ... and what is the correct way of doing it then? If you're not going to point out why it is not correct, at least post relevant working code.

    PS: Please don't waste forum space by giving...
  3. I found a way of doing it. I'm posting the...

    I found a way of doing it. I'm posting the solution here in case someone finds it useful:


    // gcc anim2.c `pkg-config --cflags --libs gtk+-3.0` -Wall -o anim2 -lm
    #include <gtk/gtk.h>
    #include...
  4. Why has C decreased so much in popularity since November 2015?

    https://www.tiobe.com/tiobe-index/c/
  5. How to draw two animations simoultaneusly using Cairo?

    I am trying to update two drawing_area widgets simultaneously.

    This so far I have got:


    // gcc anim.c `pkg-config --cflags --libs gtk+-3.0` -Wall -o anim -lm
    #include <gtk/gtk.h>
    #include...
  6. How would you change the theme of the program to...

    How would you change the theme of the program to dark?
  7. Thank you once again. My question really...

    Thank you once again.



    My question really is very basic: why is it good to hide variables? Should programmers generally avoid global variables? If so, in which situations?

    But maybe this is...
  8. Thanks Two questions I have for C (and C++...

    Thanks

    Two questions I have for C (and C++ for that matter):

    -You have set the variable ang (which is responsible for updating the drawing) to global, using the declaration:


    static int...
  9. warning: assignment from incompatible pointer type - drawing_area

    Hi folks,

    In function main() I do the following declaration:



    GtkWidget *drawing_area;

    drawing_area = gtk_builder_get_object (builder, "draw_area");
  10. Thanks Algorism! Just a few more questions...

    Thanks Algorism!

    Just a few more questions about the code:

    why is this an advantage in relation to the alternative of declaring the widgets and calling gtk_main() inside the function main()?
    ...
  11. Thanks! Why is there need for the function...

    Thanks!

    Why is there need for the function on_activate()? I mean... since this function mostly declares widgets and connects these
    with signals, could all the stuff inside on_activate() not be...
  12. EDIT to my last answer/post: where it reads "In...

    EDIT to my last answer/post: where it reads "In addition I have a preference for C (even though I am a noob). It is far less complex than C++ whilst having the same or even more power." it should...
  13. I am trying to create a program that carries out...

    I am trying to create a program that carries out animations that might change depending on the user input through the GUI buttons, so I guess treads are important!

    These animations should display...
  14. Looking at Migrating from GTK+ 2.x to GTK+ 3:...

    Looking at Migrating from GTK+ 2.x to GTK+ 3: GTK+ 3 Reference Manual, also the "gdk_draw_drawable()" function cannot be used.... hum...as a beginner the conversion to GTK3+ truly is out of my reach....
  15. What compilation flags should I use to upgrade from GTK2 to GTK3?

    Hi folks,

    Which compilation flags should I use to compile the code in https://www.cairographics.org/threaded_animation_with_cairo/ and force it to use GTK3?


    I tried
    gcc threaded_examp.c...
  16. Replies
    2
    Views
    3,895

    Once again algorism, thank you! You've been...

    Once again algorism, thank you!

    You've been very helpful, both for this question and for my previous one on plotting images based on data arrays.
  17. Replies
    2
    Views
    3,895

    Help with Cairo graphics from data

    Hi folks,

    I have been trying to create an image from pixel data using cairo, but it is not working.

    Here is a simple code that generates a .png file using cairo:



    //cc -o hello...
  18. Thanks Algorism for the improvements! One more...

    Thanks Algorism for the improvements!

    One more question: Suppose I wanted to create an animation by updating the bw array and make things move horizontally.

    I tried the following approach using...
  19. Thanks very much! It works very well (however...

    Thanks very much!

    It works very well (however i have to replace
    int main(void) by
    int main(int argc,char *argv[]) to get it to compile)




    I'm sorry I think I checked 1h ago and my...
  20. What do I use then? It would be awesome if...

    What do I use then?

    It would be awesome if you could paste some useful working code.
  21. Thanks, Considering the first part of the...

    Thanks,

    Considering the first part of the question, transforming the char array into an image, I tried unsuccessfully:


    #include <cairo.h>
    #include <stdlib.h>

    int
    main (int argc, char...
  22. How to display a 2D array as an image using GTK3+?

    Hi folks,

    I would like to know how to display an image based on the pixels defined by a 2D array using GTK3+?

    As an example, I would like to display the following myArray (in gray scale):
    ...
  23. How do I manipulate the individual pixels of a GTKImage in runtime?

    Hi, this question is about GTK3+.

    How do I display an image (could be a GTKimage) and make it have a given set of 2 dimensional array of pixels (this 2D array would be calculated in runtime) ?
    ...
  24. How do I g_print a number using a function?

    In the following code, how do I print the variable a (local to main function) using the print_number function?


    #include <gtk/gtk.h>


    static void print_number (GtkWidget *widget, gpointer...
  25. Replies
    5
    Views
    4,002

    Thanks, I think I get it now. THe source code is...

    Thanks, I think I get it now. THe source code is Freely available under the MIT license. But when you go on VSC website and download the binary (.exe file on Windows, .deb or .rpm on GNU/Linux) you...
Results 1 to 25 of 33
Page 1 of 2 1 2