public void Render() { foreach (var item in manager.Blocks) { drawer.Draw(item); } foreach (var item in manager.Fluids) { drawer.Draw(item); } }
public Bitmap CreateChart(IEnumerable <Function> functions) { var graphs = functions.Select(f => new Graph( pointsGetter.GetPointsForOneFunction(f, -20, 20), f.Color, f.Name, f.Style, f.LeftBorder, f.RightBorder)); var bitmap = graphDrawer.Draw(graphs); return(bitmap); }
private void DrawPlace_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (secondClick) { buf = true; endPoint = e.GetPosition(this); secondClick = false; IDrawer currentDrawer = DrawerDictionary[FiguresList.SelectedIndex].Creator(); if (currentDrawer != null) { currShape.StartPoint = firstPoint; currShape.EndPoint = endPoint; currShape.Type = chosenType; currentDrawer.Draw(DrawPlace, currShape); } } if (firstClick) { firstClick = false; firstPoint = e.GetPosition(this); secondClick = true; } if (buf) { buf = false; firstClick = true; } }
protected virtual void Draw(Rect region) { if (_contentDrawer != null) { _contentDrawer.Draw(); } }
public void Draw() { foreach (var particle in _particles) { _drawer.Draw(particle.Boundings, particle.Color, particle.Rotation); } }
public void Draw() { if (_shouldDraw.Invoke()) { _drawer.Draw(); } }
public void Draw() { if (CurrentTime() <= _finishTime) { _drawer.Draw(); } }
public void AddBlockTile(Block block, bool ShouldDraw) { Blocks.Add(block); if (ShouldDraw) { drawer.Draw(block); } }
public void Create() { var words = wordReader.Read(config.InputFileName); var handledWords = textFilter.ExcludeWords(words); var rectangles = tagMaker.Make(handledWords); drawer.Draw(rectangles); }
public void Save() { var words = compositor.Composite(); var image = drawer.Draw(setting, words); image.Save($"{setting.Name}.{setting.Format}"); image.Dispose(); }
public void Draw() { foreach (var wall in _level.Walls) { _drawer.Draw(wall.Boundings, wall.Color, wall.Rotation); } foreach (var block in _level.Blocks) { _drawer.Draw(block.Boundings, block.Color, block.Rotation); } _drawer.Draw(_level.Paddle.Boundings, _level.Paddle.Color, _level.Paddle.Rotation); _drawer.Draw(_level.Ball.Boundings, _level.Ball.Color, _level.Ball.Rotation); _particleManager.Draw(); }
public void Draw() { GUI.depth += _delta; _drawer.Draw(); GUI.depth -= _delta; }
protected override void Draw(Rect region) { base.Draw(region); if (_footer != null) { _footer.Draw(); } }
public IActionResult Draw(int id) { var deck = _game.Board.Decks.FirstOrDefault(d => d.Id == id); var cards = deck.Cards; var drawedCard = _drawer.Draw(ref cards); return(Ok(_deckMapper.Map(deck))); }
public void Draw() { _drawer.Draw(); if (Event.current.type == EventType.MouseUp && GUILayoutUtility.GetLastRect().Contains(Event.current.mousePosition)) { _OnClick.InvokeSafe(); } }
public void ShouldDrawCardFromInitDeck() { var cardsFromInitDeck = _board.Decks[0].Cards; var drawedCard = _drawer.Draw(ref cardsFromInitDeck); Assert.AreEqual(Rank.Ace, drawedCard.Rank); Assert.AreEqual(Color.Heart, drawedCard.Color); Assert.AreEqual(true, drawedCard.IsShown); }
private void DoRight(Rect rect) { if (selected is LevelingAction selectedAction) { DoActionContent(rect, ref selectedAction); } else { selected.Draw(rect); } }
public void Draw() { if (_listDrawer.Count() == 0 && _emptyDrawer != null) { _emptyDrawer.Draw(); } else { _listDrawer.Draw(); } }
public void Draw() { if (_sequenceDrawer.Count() > 0) { _sequenceDrawer.Draw(); } else if (_emptyDrawer != null) { _emptyDrawer.Draw(); } }
public void Tick(IDrawer drawer) { //ball _ball.Location += _ball.Direction; if (_ball.Location.X <= 0 || _ball.Location.X >= Width) { _ball.Direction = new Vector2(-_ball.Direction.X, _ball.Direction.Y); } if (_ball.Location.Y <= 0 || _ball.Location.Y >= Height) { _ball.Direction = new Vector2(_ball.Direction.X, -_ball.Direction.Y); } drawer.Draw(_ball); foreach (var player in _players) { drawer.Draw(player); } }
private void drawIDrawableUILayout(DrawableUILayout drawable, float delta, IDrawer drawer) { drawer.Draw( drawable.Drawable, drawable.Area, drawable.Tint, delta, drawable.Origin, 0, drawable.SourceRectangle ); }
public void DrawShape(IShape shape) { IDrawer drawer = drawers.FirstOrDefault(s => s.IsMatch(shape)); if (drawer == null) { Console.WriteLine($"There is no shape \"{shape.GetType().Name}\""); } else { drawer.Draw(); } }
public void Draw() { if (!_focus) { _drawerToFocus.Draw(); return; } _focus = false; GUI.SetNextControlName(_controlName); _drawerToFocus.Draw(); if (_drawerToFocus is ITextField) { EditorGUI.FocusTextInControl(_controlName); } else { GUI.FocusControl(_controlName); } }
private void OnGUI() { if (drawer == null) { var so = new UnityEditor.SerializedObject(Resources.Load("EnvironmentBuilder")); drawer = new EnvironmentSettingsDrawer(); drawer.SetUp(so); } else { drawer.Draw(); } }
private void drawIAnimatableUILayout(AnimatableUILayout animatable, float delta, IDrawer drawer) { animatable.Animatable.PreDraw(delta); drawer.Draw( animatable.Animatable, animatable.Area, animatable.Tint, delta, null, 0, animatable.Animatable.GetSourceRectangle() ); }
public void Draw() { GUI.SetNextControlName(_uniqueControlName); _drawer.Draw(); if (GUI.GetNameOfFocusedControl().Equals(_uniqueControlName)) { if (Event.current.type == EventType.KeyUp && Event.current.keyCode == KeyCode.Return) { EditorApplication.delayCall += () => ReturnPressed.InvokeSafe(); } } }
public bool Draw(object data, StateGraph context) { if (Drawer == null || ValidMethod != null && !(bool)ValidMethod.Invoke(data, null)) { return(false); } if (Drawer.Draw(Content, Info.GetValue(data), context)) { DrawerCollector.OnPropertyModify(context); Info.SetValue(data, Drawer.GetValue()); return(true); } return(false); }
public void DrawText(string text, Vector2 position, int size, Color color) { var basePosition = position; foreach (var number in text.ToArray()) { var positionMap = GetPixelPlot(number.ToString(CultureInfo.InvariantCulture)); foreach (var pixelPosition in positionMap.Pixels) { _drawer.Draw(basePosition + pixelPosition * size, color); } basePosition += new Vector2(Width, 0) * size; } }
private bool Draw(object val, StateGraph context, bool offset) { bool modify = false; if (BaseTypeDrawer != null) { modify = modify || BaseTypeDrawer.Draw(null, val, context); } using (new GUILayout.VerticalScope(offset ? ClassTypeDrawer.ContentStyle : ClassTypeDrawer.Empty)) { foreach (var field in Fields) { modify = modify || field.Draw(val, context); } } value = val; return(modify); }
void OnCanvasViewPaintSurface(object sender, SKPaintSurfaceEventArgs args) { SKImageInfo info = args.Info; SKSurface surface = args.Surface; SKCanvas canvas = surface.Canvas; canvas.Clear(); SKPaint paint = new SKPaint { Style = SKPaintStyle.Stroke, Color = Color.Red.ToSKColor(), StrokeWidth = 10 }; if (drawer != null) { drawer.Draw(canvas, paint, info.Width / 2, info.Height / 2); } }
private bool Draw(object val, StateGraph context, bool offset) { if (val == null) { DrawerCollector.OnPropertyModify(context); return(true); } if (BaseTypeDrawer != null) { BaseTypeDrawer.Draw(null, val, context); } if (ValidMethod == null || (bool)ValidMethod.Invoke(val, null)) { using (new GUILayout.VerticalScope(offset ? ContentStyle : Empty)) { foreach (var field in Fields) { field.Draw(val, context); } } } return(false); }