123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230 |
- #region MIT License
- #endregion
- using System;
- using System.Runtime.InteropServices;
- using SharpFont.Internal;
- namespace SharpFont
- {
-
-
-
-
-
-
-
-
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- public delegate int MoveToFunc(FTVector to, IntPtr user);
-
-
-
-
-
-
-
-
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- public delegate int LineToFunc(FTVector to, IntPtr user);
-
-
-
-
-
-
-
-
-
-
-
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- public delegate int ConicToFunc(FTVector control, FTVector to, IntPtr user);
-
-
-
-
-
-
-
-
-
-
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- public delegate int CubicToFunc(FTVector control1, FTVector control2, FTVector to, IntPtr user);
-
-
-
-
-
-
-
-
-
-
-
-
-
- public class OutlineFuncs
- {
- private OutlineFuncsRec rec;
-
-
-
- public OutlineFuncs()
- {
- }
-
-
-
-
-
-
-
-
-
- public OutlineFuncs(MoveToFunc moveTo, LineToFunc lineTo, ConicToFunc conicTo, CubicToFunc cubicTo, int shift, int delta)
- {
- rec.moveTo = moveTo;
- rec.lineTo = lineTo;
- rec.conicTo = conicTo;
- rec.cubicTo = cubicTo;
- rec.shift = shift;
- #if WIN64
- rec.delta = delta;
- #else
- rec.delta = (IntPtr)delta;
- #endif
- }
-
-
-
- public MoveToFunc MoveFunction
- {
- get
- {
- return rec.moveTo;
- }
- set
- {
- rec.moveTo = value;
- }
- }
-
-
-
- public LineToFunc LineFuction
- {
- get
- {
- return rec.lineTo;
- }
- set
- {
- rec.lineTo = value;
- }
- }
-
-
-
- public ConicToFunc ConicFunction
- {
- get
- {
- return rec.conicTo;
- }
- set
- {
- rec.conicTo = value;
- }
- }
-
-
-
- public CubicToFunc CubicFunction
- {
- get
- {
- return rec.cubicTo;
- }
- set
- {
- rec.cubicTo = value;
- }
- }
-
-
-
- public int Shift
- {
- get
- {
- return rec.shift;
- }
- set
- {
- rec.shift = value;
- }
- }
-
-
-
-
- public int Delta
- {
- get
- {
- return (int)rec.delta;
- }
-
- }
- }
- }
|