GMap marker in WM

Feb 23, 2010 at 8:20 AM

long time no see! :)

i still developing mobile application. but gmap marker's background isn't transparent in WM.

i was searching old discussions that problem. but i don't have a solutions.(maybe i couldn't found it)

it still doesn't works in wm? (marker's background transparent)

always thanks, radioman =}

Coordinator
Feb 23, 2010 at 8:26 AM

it's out of my 'powers' to make it transparent ;}

check http://iphoneui.codeplex.com/ i wonder if it's real transparency?

Feb 23, 2010 at 9:02 AM

The image of the button brings the background of the parent BackgroundPaint a way to paint yourself?

Coordinator
Feb 23, 2010 at 9:10 AM

keep in mind that we do not have constant background ;}

Feb 23, 2010 at 9:51 AM

a ha...!! i understand

thanks radioman =]

Feb 23, 2010 at 2:23 PM

In some cases you can acheive quite nice  "quasi-semi-transparent " images on HD screens by making every second pixel transparent.  :/

Feb 24, 2010 at 2:35 AM
Edited Feb 24, 2010 at 4:47 AM

how can i get to the 'transparent Marker' every second?

Feb 24, 2010 at 8:48 AM

Not 'every second' as in time, but 'every second pixel' as in 'one off - one on -one off - ...' ;)
Simply set the pixels to background color in your image editor.

May also do it in program, but it takes time. Something like:

 public class TouchMapControl : GMapControl
   {
      List<ITouchButton> buttons = new List<ITouchButton>();
      Bitmap _backMask;
      System.Drawing.Imaging.ImageAttributes _att;
      Image _backBuff = null;

      public string TopText { get; set; }

      public TouchMapControl()
         : base()
      {
         _att = new System.Drawing.Imaging.ImageAttributes();
         _att.SetColorKey(Color.Magenta, Color.Magenta);

         #region Make kvasi-transparent backround image for any top text
         //test          
_backMask = new Bitmap(134, 30); //X must be even bool shift = false; for (int y = 0; y < _backMask.Height; y++) { for (int x = 0; x < _backMask.Width; x++) { if (shift || x > _backMask.Width - y) // slope end _backMask.SetPixel(x, y, Color.Magenta); else _backMask.SetPixel(x, y, Color.White); shift = !shift; } shift = !shift; } #endregion } protected override void OnPaintEtc(Graphics g) { base.OnPaintEtc(g); if (!string.IsNullOrEmpty(TopText)) { g.DrawImage(_backMask, new Rectangle(0, 0, _backMask.Width, _backMask.Height), 0, 0, _backMask.Width, _backMask.Height, GraphicsUnit.Pixel, _att); g.DrawString(TopText, this.Font, CopyrightBrush, 4, 0); } foreach (ITouchButton butt in buttons) butt.Draw(g); }

The result can be seen on upper left corner of : http://home.online.no/~sthexeb/TurKart/ScreenShot5.Png

Feb 24, 2010 at 1:19 PM

thanks i'll analysis your source :)

by any chance, do you know covering the MainForm (used GMap control) to call the anotherform??