Hi Orson,

At least on Windows (and perhaps on others OS) the cursor mask looks like it is 
inverted (0 instead
of 1 and 1 instead of 0)
Therefore the probes are not visible on a white background, and are a negative 
shape on a black
background.

Here is a patch to use the right (inverted) mask.
(sorry, the initial mask is not modified, due to my lazyness, the right mask is 
built on the fly).
Not tested on OSX.

Thanks,

-- 
Jean-Pierre CHARRAS
diff --git a/eeschema/sim/simulate.cpp b/eeschema/sim/simulate.cpp
index c67b570..8a85b23 100644
--- a/eeschema/sim/simulate.cpp
+++ b/eeschema/sim/simulate.cpp
@@ -104,7 +104,11 @@ public:
         if( probe_image == NULL )
         {
             wxBitmap probe_bitmap( (const char*) cursor_probe, 32, 32 );
-            wxBitmap probe_mask_bitmap( (const char*) cursor_probe_mask, 32, 
32 );
+            // Due to a mistake, the cursor_probe_mask is inverted. build the 
right one
+            unsigned char mask[sizeof(cursor_probe_mask)];
+            for( unsigned ii = 0; ii < sizeof(mask); ii++ )
+                mask[ii] = ~cursor_probe_mask[ii];
+            wxBitmap probe_mask_bitmap( (const char*) mask, 32, 32 );
             probe_bitmap.SetMask( new wxMask( probe_mask_bitmap ) );
             probe_image = new wxImage( probe_bitmap.ConvertToImage() );
             probe_image->SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_X, 0 );
@@ -121,7 +125,11 @@ public:
         if( tune_image == NULL )
         {
             wxBitmap tune_bitmap( (const char*) cursor_tune, 32, 32 );
-            wxBitmap tune_mask_bitmap( (const char*) cursor_tune_mask, 32, 32 
);
+            // Due to a mistake, the cursor_tune_mask is inverted. build the 
right one
+            unsigned char mask[sizeof(cursor_tune_mask)];
+            for( unsigned ii = 0; ii < sizeof(mask); ii++ )
+                mask[ii] = ~cursor_tune_mask[ii];
+            wxBitmap tune_mask_bitmap( (const char*) mask, 32, 32 );
             tune_bitmap.SetMask( new wxMask( tune_mask_bitmap ) );
             tune_image = new wxImage( tune_bitmap.ConvertToImage() );
             tune_image->SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_X, 0 );
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to