This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest package="com.example.arthu.testandroidcropper" | |
xmlns:android="http://schemas.android.com/apk/res/android"> | |
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest package="com.example.arthu.testandroidcropper" | |
xmlns:android="http://schemas.android.com/apk/res/android"> | |
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// HTML syntax highlighting using Rich-Text formatting.<br/> | |
/// - Handle plain input or already in RTF format.<br/> | |
/// - Handle if input already contains RTF color table.<br/> | |
/// - Rich coloring adjusted to Visual Studio HTML coloring.<br/> | |
/// - Support to provide custom colors.<br/> | |
/// - High performance (as much as RTF format allows).<br/> | |
/// </summary> | |
/// <remarks> | |
/// The MIT License (MIT) Copyright (c) 2014 Arthur Teplitzki.<br/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Test | |
{ | |
private const int BaseIterations = 3; | |
private const int RenderIterations = 10000; | |
private const string TestString = "Test-s.tri,ng m(g=j{}3)"; | |
private static readonly Font _font1 = new Font("Arial", 11); | |
// private static readonly Font _font1 = new Font("Segoe UI", 9); | |
// private static readonly Font _font1 = new Font("Tahoma", 10); | |
// private static readonly Font _font1 = new Font("Microsoft Sans Serif", 9); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Helper to encode and set HTML fragment to clipboard.<br/> | |
/// See http://theartofdev.com/2014/06/12/setting-htmltext-to-clipboard-revisited/.<br/> | |
/// <seealso cref="CreateDataObject"/>. | |
/// </summary> | |
/// <remarks> | |
/// The MIT License (MIT) Copyright (c) 2014 Arthur Teplitzki. | |
/// </remarks> | |
public static class ClipboardHelper | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#@ template debug="false" hostspecific="true" language="C#" #> | |
<#@ output extension=".cs" encoding="UTF8" #> | |
<#@ assembly name="System.Core" #> | |
<#@ assembly name="System.Xml" #> | |
<#@ assembly name="System.Xml.Linq" #> | |
<#@ import namespace="System.IO" #> | |
<#@ import namespace="System.Xml" #> | |
<#@ import namespace="System.Xml.Linq" #> | |
<# | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Wrapper for GDI text rendering functions<br/> | |
/// This class is not thread-safe as GDI function should be called from the UI thread. | |
/// </summary> | |
/// <remarks> | |
/// http://theartofdev.com/2013/08/12/using-native-gdi-for-text-rendering-in-c/<br/> | |
/// The MIT License (MIT) Copyright (c) 2014 Arthur Teplitzki. | |
/// </remarks> | |
public sealed class NativeTextRenderer : IDisposable | |
{ |