8.1ストアアプリでWin2Dを使おうとして今System.Numerics.Matrix3x2がらみでエラーが出ています。
Win2Dではなにやら次のようにSystem.Numerics.Matrix3x2とMicrosoft.Graphics.Canvas.Numericsとで変換だか何かを行っているようなのですが、
Why does Win2D include three different sets of vector and matrix types?
それがらみかC#のPCLでSystem.Numerics.Matrix3x2を使ったクラスをストアアプリ側で継承・定義しようとすると次のようなエラーが出ます。
error CS1715: 'Note.NoteViewEtc.Win2DGraphics3.Transform': type must be 'System.Numerics.Matrix3x2' to match overridden member 'NoteAppCommon.NoteViewEtc.Graphics3.Transform' error CS0534: 'Note.NoteViewEtc.Win2DGraphics3' does not implement inherited abstract member 'NoteAppCommon.NoteViewEtc.Graphics3.Transform.get' error CS0534: 'Note.NoteViewEtc.Win2DGraphics3' does not implement inherited abstract member 'NoteAppCommon.NoteViewEtc.Graphics3.Transform.set'
添付の写真の左側がPCL側のソースです。
こちらでGraphics3を定義し、同様のものをストアアプリ側でもGraphics2として定義しています。
各々Win2DGraphics3,Win2DGraphics2として継承しているのですが、Win2DGraphics3でだけ上記のエラーが出ます。
Transformの型がSystem.Numerics.Matrix3x2でないとダメとあるのですが、System.Numerics.Matrix3x2と書いているつもり…
PCL側ではNugetでSystem.Numerics.Vectorsを取得して使っていますが、これがストアアプリ側で見えているSystem.Numerics.Matrix3x2と異なる扱いになっている?それともPCL側で定義することで上記のリンクにあるようなMicrosoft.Graphics.Canvas.Numericsとの変換?が何やらうまくいかなくなる?
前者のような気もしますが、何かわかる方いましたら情報頂けると助かります。
よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。