Friday, January 1, 2016

Climbing up...

Hello Pals,

With a warm welcome to the new year and joyous ending of the old one, I am back with the project updates. I left the previous one upto rendering the Map View. In the last two weeks, I have worked upon rendering the Map View along some text.

For rendering the text, I got familiar with Pango.Pango is a library for laying out and rendering of text. Pango can be used anywhere that text layout is needed, though most of the work on Pango so far has been done in the context of the GTK+ widget toolkit. Pango forms the core of text and font handling for GTK+-2.x.

After this I tried hands on getting Map View with some text. To render the text I used Pango layout with Cairo as backend. Basically Cairo sets the source surface. And thenPangoCairo helps in glueing them together.

Now the actual requirement of having this text is to print route directions along with the Map View. I have fetched the route directions using

"Application.routeService.route.turnPoints[index].instruction"

which gives instruction for each turn point appearing in the route, using the index.

My mentor, Jonas suggested one more method of doing it i.e. By usingOffscreenWindow. As it will tend to give the same outlook i.e. the icon , instruction and distance as it looks out in instruction box. Following is the screenshot of the same:

Currently I am working on getting comprehensive understanding of OffscreenWindow. After a meetup with the design team, we can have the final decision on the further proceedings.

Till then, stay tuned pals. Wish you all a happy and prosperous new year. :)