Closed Happypig375 closed 4 years ago
In the animation given above, instead of showing xxxxxx...
(typing x
multiple times), why don't we show something like \int_a^b f(x)\, \mathrm{d}x=F(b)-F(a)
, for example such that we can see the practical purposes?
To show the actual code for implementing one button, small x in this case.
Great work @Happypig375. For keyboard input into a Xamarin.Forms control I think the best thing is an Effect (or otherwise custom renderer) on UWP that handles focus and keyboard input. Looking into this.
Superceded by #104
0.2.0 Editor Update -
the final minor update of CSharpMath before becoming MathDisplay.NET(Edit by the time of 0.3.0 release: Not yet... I'll do it when I have time.).Features
var painter = new CSharpMath.SkiaSharp.MathPainter { /set all properties aside from LocalTypefaces, FontSize, LineStyle, MathList, LaTeX and Source (these are ignored)/ }; var keyboard = new CSharpMath.Rendering.MathKeyboard(/optional fontSize/) { /set Fonts, LineStyle and InsertionIndex here/ }; button.Pressed += (sender, e) => keyboard.KeyPress(CSharpMath.Editor.MathKeyboardInput.SmallX /or any key/); keyboard.RedrawRequested += (sender, e) => canvasView.InvalidateSurface(); canvasView.PaintSurface += (sender, e) => { e.Surface.Canvas.Clear(); //for any DrawDisplay overload, arguments after canvas are the same as Draw CSharpMath.SkiaSharp.MathPainter.DrawDisplay(painter, keyboard.Display, e.Surface.Canvas); keyboard.DrawCaret( new CSharpMath.SkiaSharp.SkiaCanvas(e.Surface.Canvas, SkiaSharp.SKStrokeCap.Butt, false), CSharpMath.Rendering.CaretShape.IBeam); };
Why did it take so long?
October was the month when most of the logic were ported successfully. However, with limited understanding of .xib files which are Xcode UI definitions, I tried to literally port the XML contents to C#, but resulted in messy code. There went November. A port of the keyboard UI code to XAML costed a December's worth of time. Not much happened here in January, mostly waiting for potential bug reports. Welp, that was time badly spent. I'm sorry for that.
Current plans
4 Merge with wpf-math
A new start
The merge with wpf-math is happening in this repository. Please watch the repository for future updates!
Supersedes #21.