Project

General

Profile

Action Item #569

Updated by Hammel almost 2 years ago

Now that I know more about scaling in Cairo I can do some needed updates to PiClock. 

 # Switch to gdk_pixbuf to load the image, thereby supporting more file types (see launcher: git diff -r c71a4a45 -r 7be3c7f6, in do_drawing()) 
 # Use libpibox to get screen dimensions (same, but in createwindow() - see call to piboxGetDisplayWidth()) 
 # Scale the images to fit the window using gdk_pixbuf scaling function (also in do_drawing()) (see launcher) 
 # Look at "this code":https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwjg5rq5vMrSAhVHjlQKHUONC90QFggaMAA&url=http%3A%2F%2Fwww.ccp4.ac.uk%2Fdist%2Fcheckout%2Fgtk%2B-2.24.23%2Fdocs%2Ftools%2Fshadow.c&usg=AFQjCNF2MVIFNdzW-Xdb-aABAY6XYoaCaQ&sig2=OLiSPL9hs39ntvyLYeOHQQ&bvm=bv.149093890,d.amc&cad=rja to see how to create a shadow from an image.    This can be used to draw shadows under the hands, though getting the light direction correct could be difficult. 

 The scaling will make the clock fit on any display.   

Back