Bílý vrch
icon TrekBuddy
www.trekbuddy.net
Outdoor companion.
  • internal / bluetooth / simulator GPS
  • offline raster maps
  • smart GPX / raw NMEA logs
  • waypoints and simple navigation
  • custom views
  • MIDP and Symbian phones
  • Blackberry
  • Android
Visit wiki to see all features, guides and howtos. Project tracker.

Partners:    (Polish/Polski)(Polski) Compass mapy      (Polish/Polski)(Polski) Galileos mapy      (Polish/Polski)(Polski) CartoMedia      (Czech/Èesky)(Èesky) Eaglesoft trasy      (Polish/Polski)(Polski) ExpressMap     

 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
CMS wishes
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    TrekBuddy Forum Index -> WishList
View previous topic :: View next topic  
Author Message
JNT



Joined: 10 Jan 2009
Posts: 409
Location: Sweden

PostPosted: Sat Oct 18, 2014 10:47 am    Post subject: CMS wishes Reply with quote

Since the sailing season is just about over here, it will give me time to update my sailing CMS over the winter. Three improvements that would help greatly:

- Centered text adjustment
- Dedicated "dial" type png font possibility (perhaps 36 or even 72 "characters" for dails, arrows etc.) **
- Ability to format numbers (round to N number of decimals, format as current coordinate format, format as time, ...)



Hopefully this could be a quick implementation while we wait for the ultimate solution: powerful scripting and user defined touch areas Wink

[Edit: added one more...]

Edit:

** It would be even better if one could define a square zero-degree picture that could then be rotated internally in Trekbuddy and displayed at this specified angle.


Last edited by JNT on Sat Jan 30, 2016 9:40 am; edited 1 time in total
Back to top
View user's profile Send private message
JNT



Joined: 10 Jan 2009
Posts: 409
Location: Sweden

PostPosted: Sat Dec 12, 2015 3:47 pm    Post subject: Text formating Reply with quote

Would still really like to have at least the first and third possibilities.
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5658

PostPosted: Mon Jan 18, 2016 9:29 am    Post subject: Reply with quote

1st - should be easy
3rd - may be fairly easy if made android-specific, because I think I may use underlying platform formatting, but I need to investigate more
Back to top
View user's profile Send private message
JNT



Joined: 10 Jan 2009
Posts: 409
Location: Sweden

PostPosted: Mon Jan 18, 2016 6:09 pm    Post subject: Reply with quote

This is great. Thanks for looking into it.

As far as the second item is concerned, what is the best future solution?
I have implemented arrows, using the picture font method down to a resolution of 5 degrees, but it is very cumbersome...



sail.font.wnd196.png
 Description:
Simple example with 22.5 degree resolution
 Filesize:  65.37 KB
 Viewed:  5531 Time(s)

sail.font.wnd196.png


Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5658

PostPosted: Mon Jan 18, 2016 7:53 pm    Post subject: Reply with quote

In the meantime:

20:25(GMT +1): uploaded apk with CMS support for left-center-right alignment. Should not break existing CMSs. (also contains backlight change popup notification, discussed in other topic)

http://www.trekbuddy.net/dev/2016-01-18/trekbuddy.apk

(size 573559)
Back to top
View user's profile Send private message
JNT



Joined: 10 Jan 2009
Posts: 409
Location: Sweden

PostPosted: Tue Jan 19, 2016 8:17 am    Post subject: Reply with quote

Thanks. Seems to work perfectly with the system fonts, but not always correctly when using an own-defined font...

In the attached picture, "DIST TO TARGET" uses a system font and "TOTAL TACKING DISTANCE" uses my own font. Perhaps the narrower characters (like ".") screws it up?



Center.png
 Description:
Red line marks the center
 Filesize:  13.26 KB
 Viewed:  5512 Time(s)

Center.png


Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5658

PostPosted: Tue Jan 19, 2016 5:35 pm    Post subject: Reply with quote

There was a bug in bitmap font text width calculation, so indeed alignment to center but also to right never worked properly Sad

http://www.trekbuddy.net/dev/2016-01-19/trekbuddy.apk

For simplicity, TB considers only '.' and ':' as narrow characters and uses this assumption in text positioning and rendering.
Some chararacters in bitmap font, however, especially '1', may be designed to be quite narrow (eg. in digital-like style), but is would be very difficult for TB to detect that. So numbers starting with digit 1 appear a bit shifted to the right with center alignment.
Back to top
View user's profile Send private message
JNT



Joined: 10 Jan 2009
Posts: 409
Location: Sweden

PostPosted: Tue Jan 19, 2016 6:37 pm    Post subject: Reply with quote

Great! Now "center" works for all my fonts.

Never noticed any problem with "right"...
Back to top
View user's profile Send private message
JNT



Joined: 10 Jan 2009
Posts: 409
Location: Sweden

PostPosted: Wed Jan 20, 2016 6:23 pm    Post subject: Reply with quote

For item 2 (graphical dails, arrows etc) it would be really nice if one could just define a square picture (for zero degrees) and then specify an angle. Then Trekbuddy can rotate it internally to the specified angle and display it in the defined area as specified in the xml file.

I don't know enough about gaphic-handling code to know whether it would be feasible, but this would really simplify CMS dial creation (no time consuming creating of long picture "fonts" required)

(modern phones and tablets should easily be able to handle it - we've come a long way from the Sony Ericsson K800i, on which I first ran Trekbuddy)
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5658

PostPosted: Mon Feb 01, 2016 6:56 pm    Post subject: Reply with quote

Something like

Code:
<fonts>
  <font ...
</fonts>
<icons>
  <icon name="wndDirection" file="windArrow.png" /> <!-- square icon -->
<icons>
<screen>
  <area x="224" y="8" w="64" h="64" icon="wndDirection">
    <value>{$sail::wndDir1}</value> <!-- rotation angle -->
  </area>
   ...
</screen>


?

Android has support for drawing rotated bitmap. Not sure about performance and quality loss, I would have to test it.
It could not support such feature on j2me phones.
Back to top
View user's profile Send private message
JNT



Joined: 10 Jan 2009
Posts: 409
Location: Sweden

PostPosted: Mon Feb 01, 2016 9:08 pm    Post subject: Reply with quote

Yes, that would be GREAT!

Very Happy
Back to top
View user's profile Send private message
JNT



Joined: 10 Jan 2009
Posts: 409
Location: Sweden

PostPosted: Tue Feb 09, 2016 8:38 pm    Post subject: Reply with quote

If I have overlapping arrows, I guess it would be like layers. How will the order be decided in such cases?
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5658

PostPosted: Tue Feb 09, 2016 9:02 pm    Post subject: Reply with quote

Areas are rendered in the same order as they are specified in xml.
Back to top
View user's profile Send private message
JNT



Joined: 10 Jan 2009
Posts: 409
Location: Sweden

PostPosted: Tue Feb 09, 2016 9:09 pm    Post subject: Reply with quote

OK, thanks. That is simple and easy to get the desired result.
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5658

PostPosted: Mon Mar 14, 2016 8:14 pm    Post subject: Reply with quote

http://www.trekbuddy.net/dev/2016-03-14/trekbuddy.apk

Code:
<cms version="1.0">
    <images>
        <image name="arrow" file="arrow.png"/>
    </images>
        <area x="32" y="120" w="32" h="32" image="arrow">
            <value>{$sail::wndDir1}</value>
        </area>
   </screen>
</cms>


Content of value should be parsable to float value, otherwise it will be printed as text.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    TrekBuddy Forum Index -> WishList All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group