Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 26-09-2014, 07:09   #76
Registered User

Join Date: Sep 2012
Location: Baikal
Posts: 581
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, 07:31   #77
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,207
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 offline   Reply With Quote
Old 26-09-2014, 07:44   #78
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,395
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 offline   Reply With Quote
Old 26-09-2014, 09:18   #79
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,207
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:	445
Size:	21.4 KB
ID:	88827  
nohal is offline   Reply With Quote
Old 27-09-2014, 12:12   #80
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
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:	198
Size:	85.2 KB
ID:	88857  
rooiedirk is offline   Reply With Quote
Old 28-09-2014, 00:23   #81
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
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, 05:06   #82
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,395
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 offline   Reply With Quote
Old 28-09-2014, 09:29   #83
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
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, 19:33   #84
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
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.
seandepagnier is offline   Reply With Quote
Old 29-09-2014, 03:19   #85
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
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:	159
Size:	182.9 KB
ID:	88945  
rooiedirk is offline   Reply With Quote
Old 29-09-2014, 05:53   #86
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
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, 03:40   #87
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
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, 57 views)
rooiedirk is offline   Reply With Quote
Old 30-09-2014, 04:33   #88
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,982
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:	172
Size:	91.5 KB
ID:	89010  
Gilletarom is offline   Reply With Quote
Old 30-09-2014, 07:00   #89
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,395
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 offline   Reply With Quote
Old 30-09-2014, 07:49   #90
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,982
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


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 07:43
OpenCPN Beta Version 3.1.802 Released bdbcat OpenCPN 158 14-08-2012 10:07
OpenCPN Beta Version 3.1.714 Released bdbcat OpenCPN 91 01-08-2012 17:08

Advertise Here


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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.