public LineRectangle(SystemManagers managers) { LocalVisible = true; mManagers = managers; mChildren = new ObservableCollection <IRenderableIpso>(); Visible = true; Renderer renderer = null; if (mManagers != null) { renderer = mManagers.Renderer; } else { renderer = Renderer.Self; } mLinePrimitive = new LinePrimitive(renderer.SinglePixelTexture); mLinePrimitive.Add(0, 0); mLinePrimitive.Add(0, 0); mLinePrimitive.Add(0, 0); mLinePrimitive.Add(0, 0); mLinePrimitive.Add(0, 0); UpdatePoints(); IsDotted = true; }
public LineRectangle(SystemManagers managers) { LocalVisible = true; mManagers = managers; mChildren = new List<IPositionedSizedObject>(); Visible = true; Renderer renderer = null; if (mManagers != null) { renderer = mManagers.Renderer; } else { renderer = Renderer.Self; } mLinePrimitive = new LinePrimitive(renderer.SinglePixelTexture); mLinePrimitive.Add(0, 0); mLinePrimitive.Add(0, 0); mLinePrimitive.Add(0, 0); mLinePrimitive.Add(0, 0); mLinePrimitive.Add(0, 0); UpdatePoints(); IsDotted = true; }
public LineRectangle(SystemManagers managers) { LocalVisible = true; mManagers = managers; mChildren = new List <IPositionedSizedObject>(); Visible = true; Renderer renderer = null; if (mManagers != null) { renderer = mManagers.Renderer; } else { renderer = Renderer.Self; } mLinePrimitive = new LinePrimitive(renderer.SinglePixelTexture); mLinePrimitive.Add(0, 0); mLinePrimitive.Add(0, 0); mLinePrimitive.Add(0, 0); mLinePrimitive.Add(0, 0); mLinePrimitive.Add(0, 0); UpdatePoints(); IsDotted = true; }
public static void RenderLinePrimitive(LinePrimitive linePrimitive, SpriteBatch spriteBatch, IPositionedSizedObject ipso, SystemManagers managers, bool isDotted) { linePrimitive.Position.X = ipso.GetAbsoluteX(); linePrimitive.Position.Y = ipso.GetAbsoluteY(); Renderer renderer; if (managers != null) { renderer = managers.Renderer; } else { renderer = Renderer.Self; } Texture2D textureToUse = renderer.SinglePixelTexture; if (isDotted) { textureToUse = renderer.DottedLineTexture; } linePrimitive.Render(spriteBatch, managers, textureToUse, .2f * renderer.Camera.Zoom); }
public static void UpdateLinePrimitive(LinePrimitive linePrimitive, IPositionedSizedObject ipso) { linePrimitive.Replace(0, Vector2.Zero); linePrimitive.Replace(1, new Vector2(ipso.Width, 0)); linePrimitive.Replace(2, new Vector2(ipso.Width, ipso.Height)); linePrimitive.Replace(3, new Vector2(0, ipso.Height)); linePrimitive.Replace(4, Vector2.Zero); // close back on itself }
public static void UpdateLinePrimitive(LinePrimitive linePrimitive, IRenderableIpso ipso) { Matrix matrix = Matrix.CreateRotationZ(-MathHelper.ToRadians(ipso.GetAbsoluteRotation())); linePrimitive.Replace(0, Vector2.Zero); linePrimitive.Replace(1, Vector2.Transform(new Vector2(ipso.Width, 0), matrix)); linePrimitive.Replace(2, Vector2.Transform(new Vector2(ipso.Width, ipso.Height), matrix)); linePrimitive.Replace(3, Vector2.Transform(new Vector2(0, ipso.Height), matrix)); linePrimitive.Replace(4, Vector2.Zero); // close back on itself }
public static void UpdateLinePrimitive(LinePrimitive linePrimitive, IPositionedSizedObject ipso) { Matrix matrix = Matrix.CreateRotationZ(-MathHelper.ToRadians(ipso.Rotation)); linePrimitive.Replace(0, Vector2.Zero); linePrimitive.Replace(1, Vector2.Transform(new Vector2(ipso.Width, 0), matrix)); linePrimitive.Replace(2, Vector2.Transform(new Vector2(ipso.Width, ipso.Height), matrix)); linePrimitive.Replace(3, Vector2.Transform(new Vector2(0, ipso.Height), matrix)); linePrimitive.Replace(4, Vector2.Zero); // close back on itself }
public LineGrid(SystemManagers managers) { Visible = true; if (managers != null) { mLinePrimitive = new LinePrimitive(managers.Renderer.SinglePixelTexture); } else { mLinePrimitive = new LinePrimitive(Renderer.Self.SinglePixelTexture); } mLinePrimitive.BreakIntoSegments = true; UpdatePoints(); }
public LineGrid(SystemManagers managers) { Visible = true; if (managers != null) { mLinePrimitive = new LinePrimitive(managers.Renderer.SinglePixelTexture); } else { mLinePrimitive = new LinePrimitive(Renderer.Self.SinglePixelTexture); } mLinePrimitive.BreakIntoSegments = true; UpdatePoints(); }
public LineCircle(SystemManagers managers) { mRadius = 32; Visible = true; if (managers != null) { mLinePrimitive = new LinePrimitive(managers.Renderer.SinglePixelTexture); } else { mLinePrimitive = new LinePrimitive(Renderer.Self.SinglePixelTexture); } UpdatePoints(); }
public Line(SystemManagers managers) { mManagers = managers; Visible = true; if (mManagers != null) { mLinePrimitive = new LinePrimitive(mManagers.Renderer.SinglePixelTexture); } else { mLinePrimitive = new LinePrimitive(Renderer.Self.SinglePixelTexture); } mChildren = new List<IPositionedSizedObject>(); UpdatePoints(); }
public LinePolygon(SystemManagers managers) { mChildren = new ObservableCollection <IRenderableIpso>(); Visible = true; if (managers != null) { mLinePrimitive = new LinePrimitive(managers.Renderer.SinglePixelTexture); } else { mLinePrimitive = new LinePrimitive(Renderer.Self.SinglePixelTexture); } // todo - make it default to something - a rectangle? }
public Line(SystemManagers managers) { mManagers = managers; Visible = true; if (mManagers != null) { mLinePrimitive = new LinePrimitive(mManagers.Renderer.SinglePixelTexture); } else { mLinePrimitive = new LinePrimitive(Renderer.Self.SinglePixelTexture); } mChildren = new List <IRenderableIpso>(); UpdatePoints(); }
public LineCircle(SystemManagers managers) { mChildren = new List <IPositionedSizedObject>(); mRadius = 32; Visible = true; if (managers != null) { mLinePrimitive = new LinePrimitive(managers.Renderer.SinglePixelTexture); } else { mLinePrimitive = new LinePrimitive(Renderer.Self.SinglePixelTexture); } UpdatePoints(); }
public LineCircle(SystemManagers managers) { mChildren = new ObservableCollection <IRenderableIpso>(); mRadius = 32; Visible = true; if (managers != null) { mLinePrimitive = new LinePrimitive(managers.Renderer.SinglePixelTexture); } else { mLinePrimitive = new LinePrimitive(Renderer.Self.SinglePixelTexture); } UpdatePoints(); }
public static void UpdateLinePrimitive(LinePrimitive linePrimitive, IPositionedSizedObject ipso) { linePrimitive.Replace(0, Vector2.Zero); linePrimitive.Replace(1, new Vector2(ipso.Width, 0)); linePrimitive.Replace(2, new Vector2(ipso.Width, ipso.Height)); linePrimitive.Replace(3, new Vector2(0, ipso.Height)); linePrimitive.Replace(4, Vector2.Zero); // close back on itself }
public static void RenderLinePrimitive(LinePrimitive linePrimitive, SpriteBatch spriteBatch, IPositionedSizedObject ipso, SystemManagers managers, bool isDotted) { linePrimitive.Position.X = ipso.GetAbsoluteX(); linePrimitive.Position.Y = ipso.GetAbsoluteY(); Renderer renderer; if (managers != null) { renderer = managers.Renderer; } else { renderer = Renderer.Self; } Texture2D textureToUse = renderer.SinglePixelTexture; if (isDotted) { textureToUse = renderer.DottedLineTexture; } linePrimitive.Render(spriteBatch, managers, textureToUse, .2f * renderer.Camera.Zoom); }
public Text(SystemManagers managers, string text = "Hello") { Visible = true; RenderBoundary = RenderBoundaryDefault; mManagers = managers; mChildren = new List<IRenderableIpso>(); mRawText = text; mNeedsBitmapFontRefresh = true; mBounds = new LinePrimitive(this.Renderer.SinglePixelTexture); mBounds.Color = Color.LightGreen; mBounds.Add(0, 0); mBounds.Add(0, 0); mBounds.Add(0, 0); mBounds.Add(0, 0); mBounds.Add(0, 0); HorizontalAlignment = Graphics.HorizontalAlignment.Left; VerticalAlignment = Graphics.VerticalAlignment.Top; #if !TEST if (LoaderManager.Self.DefaultBitmapFont != null) { this.BitmapFont = LoaderManager.Self.DefaultBitmapFont; } #endif UpdateLinePrimitive(); }
public static void UpdateLinePrimitive(LinePrimitive linePrimitive, IPositionedSizedObject ipso) { Matrix matrix = Matrix.CreateRotationZ(-MathHelper.ToRadians(ipso.Rotation)); linePrimitive.Replace(0, Vector2.Zero); linePrimitive.Replace(1, Vector2.Transform(new Vector2(ipso.Width, 0), matrix) ); linePrimitive.Replace(2, Vector2.Transform(new Vector2(ipso.Width, ipso.Height), matrix) ); linePrimitive.Replace(3, Vector2.Transform(new Vector2(0, ipso.Height), matrix) ); linePrimitive.Replace(4, Vector2.Zero); // close back on itself }