Saturday, January 30, 2016

We are getting there...

Hey pals,

"We are getting there". Yes, these were the words said by my mentor Jonas when I the attached the latest patch, which made me extremely happy and jumping. :)

In the last two weeks, I worked on adding minimaps, enabling the different layouts for long routes and shorter routes and the refactoring of code. After discussion with design team, it was confirmed that minimaps were to be added for starting and finishing points only.

To make it happen, I learnt the concept of abstract classes and the factory method. As Print layout class is made abstract  which acts as a tool-box ,or rather sort of library which provides its sub-classes the methods used to get different surfaces (MapView, Instruction, Header, etc. )

Depending on the distance, we differentiate long and short routes and so the layouts for each. As shown in mockup, the long route layout contains minimaps surfaces and shorter one doesn't as the route is clear in complete MapView itself . So following are the Screenshots taken for both types.

Delhi to Mumbai has been my favorite route for testing purpose :p . 


.
.
.
.
.
.


For the shorter route I took infocity to DA-IICT, which I follow very frequently :)


Now next step is to refine the design to make it  more friendly to the user. Also some more code refactoring is required.

Will be back pretty soon. Till then stay tuned. :)

Cheers,
Amisha
 
 

Saturday, January 16, 2016

Cruising Altitudes...


Hello Peeps,

Been a little late this time in catching you all. But yeah, I guess that can be compensated well with something which I am going to share just now.
Yayy !!! , I am able to generate a print of Map View along with instructions which looks a bit like mockups. Here is the demo video URL .

Breaking up in pieces, First I divided the data into parts. Each part is associated with corresponding page which is to be printed. From that I get number of pages which will be required and then actual  printing took place in draw-page call. The understanding of GTK Print API helped me. Begin-print signal is the one which is emitted when user is done with page setup ,but before rendering starts. All the calculations done to divide the data and get a count of pages are ensured in this one. In draw-page, actual rendering takes place using Cairo.

I am thankful to Andreas for designing an awesome UI mockup. Finally we were able to get an appropriate location and visibility behavior for Print Route Button. :) Following are the screenshots of UI.

   Without Route, print route button is not visible.


With Route, print route button is visible



Now next part is dealing with minimaps which will enlarge the route pieces and enable the user to see them with the respective instructions.

I will be back with the minimaps soon. Till then stay tuned. :)


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 then PangoCairo 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 using OffscreenWindow. 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. :)

Cheers,
Amisha