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 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; }
void UpdatePoints() { mLinePrimitive.ClearVectors(); float width = mColumnWidth * mColumnCount; float height = mRowWidth * mRowCount; float currentY = 0; for (int i = 0; i < mRowCount + 1; i++) { currentY = i * mRowWidth; mLinePrimitive.Add(0, currentY); mLinePrimitive.Add(width, currentY); } float currentX = 0; for (int i = 0; i < mColumnCount + 1; i++) { currentX = i * mColumnWidth; mLinePrimitive.Add(currentX, 0); mLinePrimitive.Add(currentX, height); } }
public void SetPoints(ICollection <Vector2> points) { mLinePrimitive.ClearVectors(); if (points != null) { foreach (var point in points) { mLinePrimitive.Add(point); } } }
private void UpdatePoints() { while (mLinePrimitive.VectorCount < 2) { mLinePrimitive.Add(0, 0); } mLinePrimitive.Replace(1, this.RelativePoint); mLinePrimitive.Position.X = this.GetAbsoluteX(); mLinePrimitive.Position.Y = this.GetAbsoluteY(); }
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(); }