Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 26-09-2014, 08:09   #76
Registered User

Join Date: Sep 2012
Location: Baikal
Posts: 270
Re: OpenCPN Beta Version 3.3.2118 Released

Quote:
Originally Posted by nohal View Post
Baikal...
Isn't there a shorter term, something like "Overzoom"? I'm not exactly sure that "Чрезмерное приближение" fits on the screen...
This is not a rhetoric question, the reason for asking it is https://github.com/OpenCPN/OpenCPN/b...canv.cpp#L9523 - We don't display that text if it is wider than 500 pixels...

Pavel
The term "overzoom" not reaching some people it represents.
in our terminology applicable ECDIS is referred to as "Завышение масштаба"
Essential that the this translation is to hit the limit
__________________

__________________
Baikal is offline   Reply With Quote
Old 26-09-2014, 08:31   #77
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
Re: OpenCPN Beta Version 3.3.2118 Released

Baikal...
Seems like a few more languages will have a similar problem, so the solution should be adjusting the size of the font and not increasing that limit to still support lower resolution displays.
Will do it later today.

Thanks for your help

Pavel
__________________

__________________
nohal is online now   Reply With Quote
Old 26-09-2014, 08:44   #78
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
Re: OpenCPN Beta Version 3.3.2118 Released

Pavel...

I guess we will reduce the font size (in a loop) and make it fit 500 wide....

oops, collision...

Dave
__________________
bdbcat is online now   Reply With Quote
Old 26-09-2014, 10:18   #79
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
Re: OpenCPN Beta Version 3.3.2118 Released

Fix is in the github master now.


Pavel
Attached Thumbnails
Click image for larger version

Name:	screenshot-area-2014-09-26-110808.png
Views:	336
Size:	21.4 KB
ID:	88827  
__________________
nohal is online now   Reply With Quote
Old 27-09-2014, 13:12   #80
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 304
Re: OpenCPN Beta Version 3.3.2118 Released

Quote:
Originally Posted by rooiedirk View Post
Also noticed that:
On showing AIS names, OpenGL does not acknowledge font color settings. The name is always printed in black. Font size, style etc are working.
found a solution for this: Works for me under linux and Intel graphics using openGL.
made some changes to ocpndc.cpp DrawText. See comments in code.
Code:
void ocpnDC::DrawText( const wxString &text, wxCoord x, wxCoord y )
{
    if( dc ) dc->DrawText( text, x, y );
    else {
        wxCoord w = 0;
        wxCoord h = 0;
#ifdef __WXMAC__
        wxBitmap tbmp(200, 200);
        wxMemoryDC mac_dc(tbmp);
        mac_dc.GetTextExtent(text, &w, &h, NULL, NULL, &m_font);
#else
        GetTextExtent( text, &w, &h );
#endif

        if( w && h ) {
            /* create maskbitmap of appropriate size and select it */
            wxBitmap maskbmp( w, h );
            wxMemoryDC temp_dc;
            temp_dc.SelectObject( maskbmp );

            /* fill bitmap with black */
            temp_dc.SetBackground( wxBrush( wxColour( 0, 0, 0 ) ) );
            temp_dc.Clear();

            /* draw the text white */
            temp_dc.SetFont( m_font );
            temp_dc.SetTextForeground( wxColour( 255, 255, 255 ) );
            temp_dc.DrawText( text, 0, 0 );
            temp_dc.SelectObject( wxNullBitmap );
        
        wxMask mask( maskbmp, wxColour( 0, 0, 0 ) ); 
        //Create new bitmap and fill it with font colour
        wxBitmap* bmp = new wxBitmap( w, h );     
            temp_dc.SelectObject( *bmp );
            temp_dc.SetBackground( wxBrush( wxColour( m_textforegroundcolour.Red(), m_textforegroundcolour.Green(),
                    m_textforegroundcolour.Blue()  ) ) );
        temp_dc.Clear();
        temp_dc.SelectObject( wxNullBitmap );
        //Set the mask(containing the text)
        bmp->SetMask( &mask );
        //finaly paint draw bitmap to screen
        DrawBitmap( *bmp, x, y, true);        
    }
    }
}
Picture with blue AISName and Yellow chart text.
Attached Thumbnails
Click image for larger version

Name:	ColouredText.png
Views:	99
Size:	85.2 KB
ID:	88857  
__________________
rooiedirk is offline   Reply With Quote
Old 28-09-2014, 01:23   #81
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 304
Re: OpenCPN Beta Version 3.3.2118 Released

Can't edit the above anymore.
Code does need some polishing aspecial adding night color scheme.
Dirk
__________________
rooiedirk is offline   Reply With Quote
Old 28-09-2014, 06:06   #82
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
Re: OpenCPN Beta Version 3.3.2118 Released

Dirk....

Nice clean code.

We will need to tweak the idea somewhat, so that we don't pay a large performance penalty when there is lots of text displayed. This method is heavily used.

Probably need to not do the bitmap approach if the text color is default black, for example....

Thanks
Dave
__________________
bdbcat is online now   Reply With Quote
Old 28-09-2014, 10:29   #83
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 304
Re: OpenCPN Beta Version 3.3.2118 Released

Yes that would help.
Also could double some code from the DrawBitmap methode without the safety testings etc, as we do know what we feed in. (Or split the DrawBitmap in 2 methodes one for checking and one do the actual drawing)

BTW normal ECDIS settings for AISname is using Green text
Dirk
__________________
rooiedirk is offline   Reply With Quote
Old 28-09-2014, 20:33   #84
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 2,824
Re: OpenCPN Beta Version 3.3.2118 Released

Quote:
Originally Posted by rooiedirk View Post
Yes that would help.
Also could double some code from the DrawBitmap methode without the safety testings etc, as we do know what we feed in. (Or split the DrawBitmap in 2 methodes one for checking and one do the actual drawing)

BTW normal ECDIS settings for AISname is using Green text
Dirk
I am trying to follow what you are talking about, but I cannot seem to find the code you posted in opcpndc.cpp, or why it is needed. Maybe you can give a full diff?

I have intel graphics and the font colors work fine. I believe the code in TexFont is what should be utilized instead of this one anyway because it's already much faster and supports colors without issues.
__________________
boat_alexandra is offline   Reply With Quote
Old 29-09-2014, 04:19   #85
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 304
Re: OpenCPN Beta Version 3.3.2118 Released

Quote:
Originally Posted by boat_alexandra View Post
I have intel graphics and the font colors work fine. I believe the code in TexFont is what should be utilized instead of this one anyway because it's already much faster and supports colors without issues.
On my Gentoo machine the font colors are not working. Did try to play a bit with the settings for mesa but no colored fonts. Double checked on a "virtual" XP and there it was working fine.
The methode void ocpnDC:rawText (line 1019) is called from several places in the code (see screenshot). I do agree with you that the TexFont is a better way of doing this, (didn't notice it was there yet) but a bit behind my skills.
Attached Thumbnails
Click image for larger version

Name:	DrawTextUse.png
Views:	87
Size:	182.9 KB
ID:	88945  
__________________
rooiedirk is offline   Reply With Quote
Old 29-09-2014, 06:53   #86
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 304
Re: OpenCPN Beta Version 3.3.2118 Released

See that for S52 charts you did implement TexFont(). Works also here if I use the US ENC's.
Dirk
__________________
rooiedirk is offline   Reply With Quote
Old 30-09-2014, 04:40   #87
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 304
Re: OpenCPN Beta Version 3.3.2118 Released

Skills are there to improve
With some try and error I have AisName writing to screen now using TexFont. TextColors are now working for me.
Dirk
Attached Files
File Type: doc ais_opengl.diff.doc (3.7 KB, 30 views)
__________________
rooiedirk is offline   Reply With Quote
Old 30-09-2014, 05:33   #88
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,296
Re: OpenCPN Beta Version 3.3.2118 Released

Hello Dave, Hello Pavel

I can finally have a good internet connection. I finally got to use all the possibilities of the plugin sQuiddio.

But when I use this plugin, I can close OpenCPN but I can not run it again.
Moreover, OpenCPN does not appear in applications of the main windows manager. But it appears in the process.
I have to go manually close the process in order to launch O again.

This is the first time I meet this problem. And as this is the first time I can fully experience sQuiddio, I guess it's related to this plugin. ????

Best regards, Gilletarom.
Attached Thumbnails
Click image for larger version

Name:	2014-09-30_Program Manager_OpenCPN-sQuiddio.jpg
Views:	91
Size:	91.5 KB
ID:	89010  
__________________
Gilletarom is offline   Reply With Quote
Old 30-09-2014, 08:00   #89
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
Re: OpenCPN Beta Version 3.3.2118 Released

Gilletarom...

This is a known bug in the OCPN base. You may avoid the problem by never accessing the "Waypoint Properties" dialog.

I know this makes life difficult for testing. A new Beta comes soon.

Thanks
Dave
__________________
bdbcat is online now   Reply With Quote
Old 30-09-2014, 08:49   #90
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,296
Re: OpenCPN Beta Version 3.3.2118 Released

Hello Dave,

Quote:
Originally Posted by bdbcat View Post
Gilletarom...
This is a known bug in the OCPN base. You may avoid the problem by never accessing the "Waypoint Properties" dialog.
.......
Dave
Oops ... Sorry. I will look forward in the flyspary.

That said, I must add that I have tried to open the characteristics of a visible waypoint, but located near several other waypoints. These hidden waypoints makes part of a route. Too often, it is the property window of route waypoints that opened.

B.R
__________________

__________________
Gilletarom is offline   Reply With Quote
Reply

Tags
enc, lease, opencpn

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCPN Beta Version 3.1.814 Released bdbcat OpenCPN 185 14-09-2012 08:43
OpenCPN Beta Version 3.1.802 Released bdbcat OpenCPN 158 14-08-2012 11:07
OpenCPN Beta Version 3.1.714 Released bdbcat OpenCPN 91 01-08-2012 18:08



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 12:23.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.