static public IDrawables <byte> Lines(this IDrawables <byte> drawable, PointD[] points) { for (int i = 1; i < points.Length; i++) { drawable = drawable.Line( points[i - 1].X, points[i - 1].Y, points[i].X, points[i].Y); } return(drawable); }
public void run(Canvas cv, IDrawables draw, IVoiceRecognition vr) { //must be run first Commands.setupCommandsList(); this.cv = cv; this.draw = (Drawables)draw; this.vr = (VoiceRegTest)vr; PushCommand("command"); vr.startListening(); vr.NewCommand += PushCommand; }
private void Canvas_Shown(object sender, EventArgs e) { draw = new Drawables(this); vr = new VoiceRegTest(); cont = new Controller(); cont.run(this, draw, vr); richTextBox1.Text = "Commands: \n \n"; vr.NewAudioInput += OnPictureBox1VisibleChanged; vr.NewInput += OntextBox1_TextChanged; cont.CommandListChanged += OnChangeRichTextBox1; draw.ListChanged += OnChangeRichTextBox1; draw.GraphicsCleared += UpdateDraw; // what happends when the Canvas is shown UpdateDraw(null, null); }
static public IDrawables <byte> Font(this IDrawables <byte> drawable, DrawableFont font) => drawable.Font(font.Family, font.Style, font.Weight, font.Stretch);
static public IDrawables <byte> FontPointSize( this IDrawables <byte> drawable, DrawableFontPointSize fontPointSize) => drawable.FontPointSize(fontPointSize.PointSize);