SharpFont + ScalableFont implementation
https://github.com/Robmaister/SharpFont TODO: replace Code Bold.otf with the full version, fix any bugs, build on Linux, possibly move ToolBox string wrapping and limiting logic to ScalableFont class for better results.
This commit is contained in:
33
SharpFont/Source/SharpFontShared/Internal/NativeObject.cs
Normal file
33
SharpFont/Source/SharpFontShared/Internal/NativeObject.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
|
||||
namespace SharpFont
|
||||
{
|
||||
/// <summary>
|
||||
/// Provide a consistent means for using pointers as references.
|
||||
/// </summary>
|
||||
public abstract class NativeObject
|
||||
{
|
||||
private IntPtr reference;
|
||||
|
||||
/// <summary>
|
||||
/// Construct a new NativeObject and assign the reference.
|
||||
/// </summary>
|
||||
/// <param name="reference"></param>
|
||||
protected NativeObject(IntPtr reference)
|
||||
{
|
||||
this.reference = reference;
|
||||
}
|
||||
|
||||
internal virtual IntPtr Reference
|
||||
{
|
||||
get
|
||||
{
|
||||
return reference;
|
||||
}
|
||||
set
|
||||
{
|
||||
reference = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user