Project

General

Profile

Actions

Action Item #569

closed

PiClock updates

Added by Hammel over 4 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Start date:
09 Mar 2017
Due date:
% Done:

100%

Estimated time:
Severity:
05 - Very Low

Description

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

  1. Switch to gdk_pixbuf to load the image, thereby supporting more file types (see launcher: git diff -r c71a4a45 -r 7be3c7f6, in do_drawing())
  2. Use libpibox to get screen dimensions (same, but in createwindow() - see call to piboxGetDisplayWidth())
  3. Scale the images to fit the window using gdk_pixbuf scaling function (also in do_drawing())
  4. Look at this code 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.

Actions

Also available in: Atom PDF