public override void Draw(IMapContext map, ISettings settings, DeepSky ds) { if (map.ViewAngle <= Renderer.minZoom) { base.Draw(map, settings, ds); } }
public virtual void Draw(IMapContext map, ISettings settings, DeepSky ds) { PointF p = map.Project(ds.Horizontal); float sizeA = GetDiameter(map, ds.SizeA); float sizeB = GetDiameter(map, ds.SizeB); // elliptic object with known size if (sizeB > 0 && sizeB != sizeA) { float diamA = GetDiameter(map, ds.SizeA); if (diamA > 10) { float diamB = GetDiameter(map, ds.SizeB); if (ds.Outline != null && settings.Get <bool>("DeepSkyOutlines")) { DrawOutline(map, ds.Outline); } else { float rotation = map.GetRotationTowardsNorth(ds.Equatorial) + 90 - ds.PA; map.Graphics.TranslateTransform(p.X, p.Y); map.Graphics.RotateTransform(rotation); DrawEllipticObject(map.Graphics, diamA, diamB); map.Graphics.ResetTransform(); } map.AddDrawnObject(ds); if (map.ViewAngle <= Renderer.limitLabels && settings.Get <bool>("DeepSkyLabels")) { var font = settings.Get <Font>("DeepSkyLabelsFont"); map.DrawObjectCaption(font, Renderer.brushCaption, ds.DisplayName, p, Math.Min(diamA, diamB)); } } } // round object else if (sizeA > 0) { float diamA = GetDiameter(map, ds.SizeA); if (diamA > 10) { if (ds.Outline != null && settings.Get <bool>("DeepSkyOutlines")) { DrawOutline(map, ds.Outline); } else { float rotation = map.GetRotationTowardsNorth(ds.Equatorial) + 90 - ds.PA; map.Graphics.TranslateTransform(p.X, p.Y); map.Graphics.RotateTransform(rotation); DrawRoundObject(map.Graphics, diamA); map.Graphics.ResetTransform(); } map.AddDrawnObject(ds); if (map.ViewAngle <= Renderer.limitLabels && settings.Get <bool>("DeepSkyLabels")) { var font = settings.Get <Font>("DeepSkyLabelsFont"); map.DrawObjectCaption(font, Renderer.brushCaption, ds.DisplayName, p, diamA); } } } // point object else { float size = map.GetPointSize(ds.Mag == null ? 15 : ds.Mag.Value); if ((int)size > 0) { if (ds.Outline != null && settings.Get <bool>("DeepSkyOutlines")) { DrawOutline(map, ds.Outline); } else { map.Graphics.TranslateTransform(p.X, p.Y); DrawPointObject(map.Graphics, size); map.Graphics.ResetTransform(); } map.AddDrawnObject(ds); if (map.ViewAngle <= Renderer.limitLabels && settings.Get <bool>("DeepSkyLabels")) { var font = settings.Get <Font>("DeepSkyLabelsFont"); map.DrawObjectCaption(font, Renderer.brushCaption, ds.DisplayName, p, 0); } } } }
public void Draw(IMapContext map, ISettings settings, DeepSky ds) { // Do nothing }