mirror of https://github.com/SixLabors/ImageSharp
277 changed files with 2051 additions and 2673 deletions
@ -1,249 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?> |
|||
<!--Rebracer Solution Settings File--> |
|||
<!--This file contains Visual Studio settings for ImageProcessorCore.sln.--> |
|||
<!--Rebracer uses this file to apply settings for this solution--> |
|||
<!--when the solution is opened.--> |
|||
<!--Install Rebracer from http://visualstudiogallery.msdn.microsoft.com/410e9b9f-65f3-4495-b68e-15567e543c58 --> |
|||
<!--See https://github.com/SLaks/Rebracer for more information--> |
|||
<UserSettings> |
|||
<ToolsOptions> |
|||
<ToolsOptionsCategory name="Environment"> |
|||
<ToolsOptionsSubCategory name="TaskList"> |
|||
<PropertyValue name="CommentTokens" ArrayType="VT_VARIANT" ArrayElementCount="4"> |
|||
<PropertyValue name="0">HACK:2</PropertyValue> |
|||
<PropertyValue name="1">TODO:2</PropertyValue> |
|||
<PropertyValue name="2">UNDONE:2</PropertyValue> |
|||
<PropertyValue name="3">UnresolvedMergeConflict:3</PropertyValue> |
|||
</PropertyValue> |
|||
<PropertyValue name="ConfirmTaskDeletion">false</PropertyValue> |
|||
<PropertyValue name="DontShowFilePaths">false</PropertyValue> |
|||
<PropertyValue name="WarnOnAddingHiddenItem">false</PropertyValue> |
|||
</ToolsOptionsSubCategory> |
|||
</ToolsOptionsCategory> |
|||
<ToolsOptionsCategory name="TextEditor"> |
|||
<ToolsOptionsSubCategory name="CSharp-Specific"> |
|||
<PropertyValue name="AddImport_SuggestForTypesInNuGetPackages">0</PropertyValue> |
|||
<PropertyValue name="AddImport_SuggestForTypesInReferenceAssemblies">0</PropertyValue> |
|||
<PropertyValue name="AutoComment">1</PropertyValue> |
|||
<PropertyValue name="AutoInsertAsteriskForNewLinesOfBlockComments">1</PropertyValue> |
|||
<PropertyValue name="CSharpClosedFileDiagnostics">-1</PropertyValue> |
|||
<PropertyValue name="ClosedFileDiagnostics">-1</PropertyValue> |
|||
<PropertyValue name="DisplayLineSeparators">0</PropertyValue> |
|||
<PropertyValue name="EnableHighlightRelatedKeywords">1</PropertyValue> |
|||
<PropertyValue name="ExtractMethod_AllowMovingDeclaration">0</PropertyValue> |
|||
<PropertyValue name="ExtractMethod_DoNotPutOutOrRefOnStruct">1</PropertyValue> |
|||
<PropertyValue name="Formatting_TriggerOnBlockCompletion">1</PropertyValue> |
|||
<PropertyValue name="Formatting_TriggerOnPaste">1</PropertyValue> |
|||
<PropertyValue name="Formatting_TriggerOnStatementCompletion">1</PropertyValue> |
|||
<PropertyValue name="Indent_BlockContents">1</PropertyValue> |
|||
<PropertyValue name="Indent_Braces">0</PropertyValue> |
|||
<PropertyValue name="Indent_CaseContents">1</PropertyValue> |
|||
<PropertyValue name="Indent_CaseLabels">1</PropertyValue> |
|||
<PropertyValue name="Indent_FlushLabelsLeft">0</PropertyValue> |
|||
<PropertyValue name="Indent_UnindentLabels">2</PropertyValue> |
|||
<PropertyValue name="NewLines_AnonymousTypeInitializer_EachMember">1</PropertyValue> |
|||
<PropertyValue name="NewLines_Braces_Accessor">1</PropertyValue> |
|||
<PropertyValue name="NewLines_Braces_AnonymousMethod">1</PropertyValue> |
|||
<PropertyValue name="NewLines_Braces_AnonymousTypeInitializer">1</PropertyValue> |
|||
<PropertyValue name="NewLines_Braces_ControlFlow">1</PropertyValue> |
|||
<PropertyValue name="NewLines_Braces_LambdaExpressionBody">1</PropertyValue> |
|||
<PropertyValue name="NewLines_Braces_Method">1</PropertyValue> |
|||
<PropertyValue name="NewLines_Braces_ObjectInitializer">1</PropertyValue> |
|||
<PropertyValue name="NewLines_Braces_Property">1</PropertyValue> |
|||
<PropertyValue name="NewLines_Braces_Type">1</PropertyValue> |
|||
<PropertyValue name="NewLines_Keywords_Catch">1</PropertyValue> |
|||
<PropertyValue name="NewLines_Keywords_Else">1</PropertyValue> |
|||
<PropertyValue name="NewLines_Keywords_Finally">1</PropertyValue> |
|||
<PropertyValue name="NewLines_ObjectInitializer_EachMember">1</PropertyValue> |
|||
<PropertyValue name="NewLines_QueryExpression_EachClause">1</PropertyValue> |
|||
<PropertyValue name="RenameTrackingPreview">1</PropertyValue> |
|||
<PropertyValue name="SortUsings_PlaceSystemFirst">0</PropertyValue> |
|||
<PropertyValue name="Space_AfterBasesColon">1</PropertyValue> |
|||
<PropertyValue name="Space_AfterCast">0</PropertyValue> |
|||
<PropertyValue name="Space_AfterComma">1</PropertyValue> |
|||
<PropertyValue name="Space_AfterDot">0</PropertyValue> |
|||
<PropertyValue name="Space_AfterMethodCallName">0</PropertyValue> |
|||
<PropertyValue name="Space_AfterMethodDeclarationName">0</PropertyValue> |
|||
<PropertyValue name="Space_AfterSemicolonsInForStatement">1</PropertyValue> |
|||
<PropertyValue name="Space_AroundBinaryOperator">1</PropertyValue> |
|||
<PropertyValue name="Space_BeforeBasesColon">1</PropertyValue> |
|||
<PropertyValue name="Space_BeforeComma">0</PropertyValue> |
|||
<PropertyValue name="Space_BeforeDot">0</PropertyValue> |
|||
<PropertyValue name="Space_BeforeOpenSquare">0</PropertyValue> |
|||
<PropertyValue name="Space_BeforeSemicolonsInForStatement">0</PropertyValue> |
|||
<PropertyValue name="Space_BetweenEmptyMethodCallParentheses">0</PropertyValue> |
|||
<PropertyValue name="Space_BetweenEmptyMethodDeclarationParentheses">0</PropertyValue> |
|||
<PropertyValue name="Space_BetweenEmptySquares">0</PropertyValue> |
|||
<PropertyValue name="Space_InControlFlowConstruct">1</PropertyValue> |
|||
<PropertyValue name="Space_WithinCastParentheses">0</PropertyValue> |
|||
<PropertyValue name="Space_WithinExpressionParentheses">0</PropertyValue> |
|||
<PropertyValue name="Space_WithinMethodCallParentheses">0</PropertyValue> |
|||
<PropertyValue name="Space_WithinMethodDeclarationParentheses">0</PropertyValue> |
|||
<PropertyValue name="Space_WithinOtherParentheses">0</PropertyValue> |
|||
<PropertyValue name="Space_WithinSquares">0</PropertyValue> |
|||
<PropertyValue name="Style_PreferIntrinsicPredefinedTypeKeywordInDeclaration">1</PropertyValue> |
|||
<PropertyValue name="Style_PreferIntrinsicPredefinedTypeKeywordInMemberAccess">1</PropertyValue> |
|||
<PropertyValue name="Style_QualifyMemberAccessWithThisOrMe">0</PropertyValue> |
|||
<PropertyValue name="Style_UseVarWhenDeclaringLocals">1</PropertyValue> |
|||
<PropertyValue name="WarnOnBuildErrors">0</PropertyValue> |
|||
<PropertyValue name="Wrapping_IgnoreSpacesAroundBinaryOperators">0</PropertyValue> |
|||
<PropertyValue name="Wrapping_IgnoreSpacesAroundVariableDeclaration">0</PropertyValue> |
|||
<PropertyValue name="Wrapping_KeepStatementsOnSingleLine">1</PropertyValue> |
|||
<PropertyValue name="Wrapping_PreserveSingleLine">1</PropertyValue> |
|||
</ToolsOptionsSubCategory> |
|||
<ToolsOptionsSubCategory name="JavaScript Specific"> |
|||
<PropertyValue name="DownloadRemoteReferences">false</PropertyValue> |
|||
<PropertyValue name="FormatCompletedBlockOnRightCurlyBrace">true</PropertyValue> |
|||
<PropertyValue name="FormatCompletedLineOnEnter">true</PropertyValue> |
|||
<PropertyValue name="FormatCompletedStatementOnSemicolon">true</PropertyValue> |
|||
<PropertyValue name="FormatOnPaste">true</PropertyValue> |
|||
<PropertyValue name="ImplicitReferencesString">Implicit (Windows)|$(VSInstallDir)\JavaScript\References\libhelp.js|$(VSInstallDir)\JavaScript\References\domWindows.js|$(VSInstallDir)\JavaScript\References\underscorefilter.js|$(VSInstallDir)\JavaScript\References\showPlainComments.js;Implicit (Windows 8.1)|$(VSInstallDir)\JavaScript\References\libhelp.js|$(VSInstallDir)\JavaScript\References\sitetypesWindows.js|$(VSInstallDir)\JavaScript\References\domWindows_8.1.js|$(VSInstallDir)\JavaScript\References\underscorefilter.js|$(VSInstallDir)\JavaScript\References\showPlainComments.js;Implicit (Windows Phone 8.1)|$(VSInstallDir)\JavaScript\References\libhelp.js|$(VSInstallDir)\JavaScript\References\sitetypesWindows.js|$(VSInstallDir)\JavaScript\References\domWindowsPhone_8.1.js|$(VSInstallDir)\JavaScript\References\underscorefilter.js|$(VSInstallDir)\JavaScript\References\showPlainComments.js;Implicit (Web)|$(VSInstallDir)\JavaScript\References\libhelp.js|$(VSInstallDir)\JavaScript\References\sitetypesWeb.js|$(VSInstallDir)\JavaScript\References\domWeb.js|$(VSInstallDir)\JavaScript\References\underscorefilter.js|$(VSInstallDir)\JavaScript\References\showPlainComments.js|C:\Users\james.south\AppData\Local\Web Essentials 2015\Modern.Intellisense.js;Dedicated Worker|$(VSInstallDir)\JavaScript\References\libhelp.js|$(VSInstallDir)\JavaScript\References\dedicatedworker.js|$(VSInstallDir)\JavaScript\References\underscorefilter.js|$(VSInstallDir)\JavaScript\References\showPlainComments.js;Generic|$(VSInstallDir)\JavaScript\References\libhelp.js|$(VSInstallDir)\JavaScript\References\underscorefilter.js|$(VSInstallDir)\JavaScript\References\showPlainComments.js;</PropertyValue> |
|||
<PropertyValue name="InsertSpaceAfterCommaDelimiter">true</PropertyValue> |
|||
<PropertyValue name="InsertSpaceAfterFunctionKeywordForAnonymousFunctions">true</PropertyValue> |
|||
<PropertyValue name="InsertSpaceAfterKeywordsInControlFlowStatements">true</PropertyValue> |
|||
<PropertyValue name="InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis">false</PropertyValue> |
|||
<PropertyValue name="InsertSpaceAfterSemicolonInForStatements">true</PropertyValue> |
|||
<PropertyValue name="InsertSpaceBeforeAndAfterBinaryOperators">true</PropertyValue> |
|||
<PropertyValue name="PlaceOpenBraceOnNewLineForControlBlocks">false</PropertyValue> |
|||
<PropertyValue name="PlaceOpenBraceOnNewLineForFunctionsAndClasses">false</PropertyValue> |
|||
<PropertyValue name="ShowErrorsAsWarnings">true</PropertyValue> |
|||
<PropertyValue name="ShowSyntaxErrors">true</PropertyValue> |
|||
</ToolsOptionsSubCategory> |
|||
<ToolsOptionsSubCategory name="C/C++ Specific"> |
|||
<PropertyValue name="AddSemicolonForClassTypes">true</PropertyValue> |
|||
<PropertyValue name="AlignParameters">false</PropertyValue> |
|||
<PropertyValue name="AlwaysUseFallbackLocation">false</PropertyValue> |
|||
<PropertyValue name="AutoFormatOnBraceCompletion">true</PropertyValue> |
|||
<PropertyValue name="AutoFormatOnClosingBrace">true</PropertyValue> |
|||
<PropertyValue name="AutoFormatOnPaste">true</PropertyValue> |
|||
<PropertyValue name="AutoFormatOnPaste2">1</PropertyValue> |
|||
<PropertyValue name="AutoFormatOnSemicolon">true</PropertyValue> |
|||
<PropertyValue name="AutoIndentOnTab">false</PropertyValue> |
|||
<PropertyValue name="ColorizeInactiveBlocksDifferently">true</PropertyValue> |
|||
<PropertyValue name="DisableBrowsingUpToDateCheck">true</PropertyValue> |
|||
<PropertyValue name="DisableCreateDeclDefnScan">false</PropertyValue> |
|||
<PropertyValue name="DisableErrorReporting">false</PropertyValue> |
|||
<PropertyValue name="DisableIntelliSenseErrorsInErrorList">false</PropertyValue> |
|||
<PropertyValue name="EnableChangeSignature">false</PropertyValue> |
|||
<PropertyValue name="EnableExpandPrecedence">false</PropertyValue> |
|||
<PropertyValue name="EnableExpandScopes">false</PropertyValue> |
|||
<PropertyValue name="EnableExtractFunction">false</PropertyValue> |
|||
<PropertyValue name="EnableSQLiteStoreEngine">true</PropertyValue> |
|||
<PropertyValue name="EnableSingleFileISense">true</PropertyValue> |
|||
<PropertyValue name="EnableSingleFileISenseSquiggles">false</PropertyValue> |
|||
<PropertyValue name="EnumerateCommentTasks">true</PropertyValue> |
|||
<PropertyValue name="GroupBrackets">true</PropertyValue> |
|||
<PropertyValue name="HideExperimentalAd">true</PropertyValue> |
|||
<PropertyValue name="HighlightMatchingTokens">true</PropertyValue> |
|||
<PropertyValue name="IndentAccessSpecifiers">false</PropertyValue> |
|||
<PropertyValue name="IndentBlockContents">true</PropertyValue> |
|||
<PropertyValue name="IndentBraces">false</PropertyValue> |
|||
<PropertyValue name="IndentCaseBraces">false</PropertyValue> |
|||
<PropertyValue name="IndentCaseContents">true</PropertyValue> |
|||
<PropertyValue name="IndentCaseLabels">false</PropertyValue> |
|||
<PropertyValue name="IndentGotoLabels">1</PropertyValue> |
|||
<PropertyValue name="IndentNamespaceContents">true</PropertyValue> |
|||
<PropertyValue name="IndentPreprocessor">2</PropertyValue> |
|||
<PropertyValue name="IndentationReference">2</PropertyValue> |
|||
<PropertyValue name="MemberListDotToArrow">false</PropertyValue> |
|||
<PropertyValue name="MemberListFilterHeuristic">false</PropertyValue> |
|||
<PropertyValue name="NewlineControlBlockBrace">0</PropertyValue> |
|||
<PropertyValue name="NewlineEmptyFunctionCloseBrace">true</PropertyValue> |
|||
<PropertyValue name="NewlineEmptyTypeCloseBrace">true</PropertyValue> |
|||
<PropertyValue name="NewlineFunctionBrace">0</PropertyValue> |
|||
<PropertyValue name="NewlineInitListBrace">0</PropertyValue> |
|||
<PropertyValue name="NewlineKeywordCatch">true</PropertyValue> |
|||
<PropertyValue name="NewlineKeywordElse">true</PropertyValue> |
|||
<PropertyValue name="NewlineKeywordWhile">false</PropertyValue> |
|||
<PropertyValue name="NewlineLambdaBrace">0</PropertyValue> |
|||
<PropertyValue name="NewlineNamespaceBrace">0</PropertyValue> |
|||
<PropertyValue name="NewlineScopeBrace">false</PropertyValue> |
|||
<PropertyValue name="NewlineTypeBrace">0</PropertyValue> |
|||
<PropertyValue name="PreserveBlock">1</PropertyValue> |
|||
<PropertyValue name="PreserveCommentIndentation">false</PropertyValue> |
|||
<PropertyValue name="PreserveInitListSpace">true</PropertyValue> |
|||
<PropertyValue name="PreserveParameterIndentation">false</PropertyValue> |
|||
<PropertyValue name="RefactorScope">2</PropertyValue> |
|||
<PropertyValue name="RemoveSpaceBeforeSemicolon">true</PropertyValue> |
|||
<PropertyValue name="RenameRenameComments">false</PropertyValue> |
|||
<PropertyValue name="RenameRenameInactive">false</PropertyValue> |
|||
<PropertyValue name="RenameRenameStrings">false</PropertyValue> |
|||
<PropertyValue name="RenameRenameUnconfirmed">false</PropertyValue> |
|||
<PropertyValue name="RenameSearchComments">true</PropertyValue> |
|||
<PropertyValue name="RenameSearchStrings">true</PropertyValue> |
|||
<PropertyValue name="RenameShowPreview">false</PropertyValue> |
|||
<PropertyValue name="RenameSkipPreviewIfConfirmed">false</PropertyValue> |
|||
<PropertyValue name="ShowSingleFileISenseErrorsInTaskList">false</PropertyValue> |
|||
<PropertyValue name="SpaceAfterCastParenthesis">false</PropertyValue> |
|||
<PropertyValue name="SpaceAfterComma">true</PropertyValue> |
|||
<PropertyValue name="SpaceAfterSemicolon">true</PropertyValue> |
|||
<PropertyValue name="SpaceAroundAssignmentOperator">2</PropertyValue> |
|||
<PropertyValue name="SpaceAroundBinaryOperator">2</PropertyValue> |
|||
<PropertyValue name="SpaceAroundConditionalOperator">2</PropertyValue> |
|||
<PropertyValue name="SpaceBeforeBlockBrace">true</PropertyValue> |
|||
<PropertyValue name="SpaceBeforeBracket">false</PropertyValue> |
|||
<PropertyValue name="SpaceBeforeComma">false</PropertyValue> |
|||
<PropertyValue name="SpaceBeforeConstructorColon">true</PropertyValue> |
|||
<PropertyValue name="SpaceBeforeControlBlockParenthesis">true</PropertyValue> |
|||
<PropertyValue name="SpaceBeforeEmptyBracket">false</PropertyValue> |
|||
<PropertyValue name="SpaceBeforeFunctionParenthesis">false</PropertyValue> |
|||
<PropertyValue name="SpaceBeforeFunctionParenthesis2">1</PropertyValue> |
|||
<PropertyValue name="SpaceBeforeInheritanceColon">true</PropertyValue> |
|||
<PropertyValue name="SpaceBeforeInitListBrace">false</PropertyValue> |
|||
<PropertyValue name="SpaceBeforeLambdaParenthesis">false</PropertyValue> |
|||
<PropertyValue name="SpaceBetweenEmptyBraces">false</PropertyValue> |
|||
<PropertyValue name="SpaceBetweenEmptyBrackets">false</PropertyValue> |
|||
<PropertyValue name="SpaceBetweenEmptyFunctionParentheses">false</PropertyValue> |
|||
<PropertyValue name="SpaceBetweenEmptyLambdaBrackets">false</PropertyValue> |
|||
<PropertyValue name="SpaceWithinBrackets">false</PropertyValue> |
|||
<PropertyValue name="SpaceWithinCastParentheses">false</PropertyValue> |
|||
<PropertyValue name="SpaceWithinControlBlockParentheses">false</PropertyValue> |
|||
<PropertyValue name="SpaceWithinExpressionParentheses">false</PropertyValue> |
|||
<PropertyValue name="SpaceWithinFunctionParentheses">false</PropertyValue> |
|||
<PropertyValue name="SpaceWithinInitListBraces">true</PropertyValue> |
|||
<PropertyValue name="SpaceWithinLambdaBrackets">false</PropertyValue> |
|||
<PropertyValue name="SuspendNewSingleFileISenseDuringDebugging">false</PropertyValue> |
|||
<PropertyValue name="TrimSpaceAroundScope">true</PropertyValue> |
|||
<PropertyValue name="TrimSpaceUnaryOperator">true</PropertyValue> |
|||
</ToolsOptionsSubCategory> |
|||
<ToolsOptionsSubCategory name="TypeScript Specific"> |
|||
<PropertyValue name="AutomaticallyCompileTypeScriptFilesWhenSavedWhenNoSolution">false</PropertyValue> |
|||
<PropertyValue name="ES3ForFilesThatAreNotPartOfAProject">false</PropertyValue> |
|||
<PropertyValue name="ES5ForFilesThatAreNotPartOfAProject">true</PropertyValue> |
|||
<PropertyValue name="ES6ForFilesThatAreNotPartOfAProject">false</PropertyValue> |
|||
<PropertyValue name="FormatCompletedBlockOnRightCurlyBrace">true</PropertyValue> |
|||
<PropertyValue name="FormatCompletedLineOnEnter">true</PropertyValue> |
|||
<PropertyValue name="FormatCompletedStatementOnSemicolon">true</PropertyValue> |
|||
<PropertyValue name="FormatOnPaste">true</PropertyValue> |
|||
<PropertyValue name="InsertSpaceAfterCommaDelimiter">true</PropertyValue> |
|||
<PropertyValue name="InsertSpaceAfterFunctionKeywordForAnonymousFunctions">true</PropertyValue> |
|||
<PropertyValue name="InsertSpaceAfterKeywordsInControlFlowStatements">true</PropertyValue> |
|||
<PropertyValue name="InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis">false</PropertyValue> |
|||
<PropertyValue name="InsertSpaceAfterSemicolonInForStatements">true</PropertyValue> |
|||
<PropertyValue name="InsertSpaceBeforeAndAfterBinaryOperators">true</PropertyValue> |
|||
<PropertyValue name="PlaceOpenBraceOnNewLineForControlBlocks">false</PropertyValue> |
|||
<PropertyValue name="PlaceOpenBraceOnNewLineForFunctions">false</PropertyValue> |
|||
<PropertyValue name="ShowGruntGulpDialogForAspNet">true</PropertyValue> |
|||
<PropertyValue name="ShowVirtualProjectsInSolutionExplorerWhenNoSolution">true</PropertyValue> |
|||
<PropertyValue name="ShowVirtualProjectsInSolutionExplorerWhenSolutionOpen">false</PropertyValue> |
|||
<PropertyValue name="UseAMDCodeGenerationForModulesThatAreNotPartOfAProject">false</PropertyValue> |
|||
<PropertyValue name="UseCommonJSCodeGenerationForModulesThatAreNotPartOfAProject">false</PropertyValue> |
|||
<PropertyValue name="UseES2015CodeGenerationForModulesThatAreNotPartOfAProject">false</PropertyValue> |
|||
<PropertyValue name="UseJsxPreserveForFilesThatAreNotPartOfAProject">false</PropertyValue> |
|||
<PropertyValue name="UseJsxReactForFilesThatAreNotPartOfAProject">false</PropertyValue> |
|||
<PropertyValue name="UseSystemCodeGenerationForModulesThatAreNotPartOfAProject">false</PropertyValue> |
|||
<PropertyValue name="UseUMDCodeGenerationForModulesThatAreNotPartOfAProject">false</PropertyValue> |
|||
</ToolsOptionsSubCategory> |
|||
<ToolsOptionsSubCategory name="HTMLX Specific"> |
|||
<PropertyValue name="EnableTagNavigator">false</PropertyValue> |
|||
<PropertyValue name="EnableValidation">true</PropertyValue> |
|||
<PropertyValue name="ErrorsAsWarnings">true</PropertyValue> |
|||
<PropertyValue name="FormatOnPaste">true</PropertyValue> |
|||
<PropertyValue name="IdentifyHelpfulExtensions">false</PropertyValue> |
|||
<PropertyValue name="InsertAttributeValueQuotes">true</PropertyValue> |
|||
<PropertyValue name="InsertClosingTag">true</PropertyValue> |
|||
<PropertyValue name="XHtmlCodingStyle">true</PropertyValue> |
|||
</ToolsOptionsSubCategory> |
|||
</ToolsOptionsCategory> |
|||
</ToolsOptions> |
|||
</UserSettings> |
|||
@ -1,56 +0,0 @@ |
|||
<StyleCopSettings Version="105"> |
|||
<GlobalSettings> |
|||
<CollectionProperty Name="RecognizedWords"> |
|||
<Value>enum</Value> |
|||
<Value>exif</Value> |
|||
<Value>uint</Value> |
|||
<Value>lossy</Value> |
|||
<Value>octree</Value> |
|||
<Value>png</Value> |
|||
<Value>quantizer</Value> |
|||
<Value>unzig</Value> |
|||
<Value>cb</Value> |
|||
<Value>cr</Value> |
|||
<Value>Laplacian</Value> |
|||
<Value>Sobel</Value> |
|||
<Value>Scharr</Value> |
|||
<Value>rgb</Value> |
|||
<Value>rgba</Value> |
|||
<Value>rrggbb</Value> |
|||
<Value>rrggbbaa</Value> |
|||
<Value>scanline</Value> |
|||
<Value>scanlines</Value> |
|||
<Value>png's</Value> |
|||
<Value>codeword</Value> |
|||
<Value>unscaled</Value> |
|||
<Value>zig-zag</Value> |
|||
<Value>crc</Value> |
|||
<Value>zlib</Value> |
|||
<Value>xff</Value> |
|||
<Value>xda</Value> |
|||
<Value>ss</Value> |
|||
<Value>Vol</Value> |
|||
<Value>pp</Value> |
|||
<Value>cmyk</Value> |
|||
<Value>Paeth</Value> |
|||
<Value>th</Value> |
|||
<Value>bool</Value> |
|||
<Value>bools</Value> |
|||
<Value>desensitivity</Value> |
|||
<Value>premultiplied</Value> |
|||
<Value>endianness</Value> |
|||
<Value>thresholding</Value> |
|||
</CollectionProperty> |
|||
</GlobalSettings> |
|||
<Analyzers> |
|||
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules"> |
|||
<AnalyzerSettings> |
|||
<StringProperty Name="CompanyName">James Jackson-South</StringProperty> |
|||
<StringProperty Name="Copyright"> |
|||
Copyright © James Jackson-South and contributors. |
|||
Licensed under the Apache License, Version 2.0. |
|||
</StringProperty> |
|||
</AnalyzerSettings> |
|||
</Analyzer> |
|||
</Analyzers> |
|||
</StyleCopSettings> |
|||
@ -1,168 +0,0 @@ |
|||
// <copyright file="Brushes{TPixel}.cs" company="James Jackson-South">
|
|||
// Copyright (c) James Jackson-South and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
// </copyright>
|
|||
|
|||
namespace ImageSharp.Drawing.Brushes |
|||
{ |
|||
using ImageSharp.PixelFormats; |
|||
|
|||
/// <summary>
|
|||
/// A collection of methods for creating generic brushes.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPixel">The pixel format.</typeparam>
|
|||
/// <returns>A Brush</returns>
|
|||
public class Brushes<TPixel> |
|||
where TPixel : struct, IPixel<TPixel> |
|||
{ |
|||
/// <summary>
|
|||
/// Percent10 Hatch Pattern
|
|||
/// </summary>
|
|||
/// ---> x axis
|
|||
/// ^
|
|||
/// | y - axis
|
|||
/// |
|
|||
/// see PatternBrush for details about how to make new patterns work
|
|||
private static readonly bool[,] Percent10Pattern = |
|||
{ |
|||
{ true, false, false, false }, |
|||
{ false, false, false, false }, |
|||
{ false, false, true, false }, |
|||
{ false, false, false, false } |
|||
}; |
|||
|
|||
/// <summary>
|
|||
/// Percent20 pattern.
|
|||
/// </summary>
|
|||
private static readonly bool[,] Percent20Pattern = |
|||
{ |
|||
{ true, false, false, false }, |
|||
{ false, false, true, false }, |
|||
{ true, false, false, false }, |
|||
{ false, false, true, false } |
|||
}; |
|||
|
|||
/// <summary>
|
|||
/// Horizontal Hatch Pattern
|
|||
/// </summary>
|
|||
private static readonly bool[,] HorizontalPattern = |
|||
{ |
|||
{ false }, |
|||
{ true }, |
|||
{ false }, |
|||
{ false } |
|||
}; |
|||
|
|||
/// <summary>
|
|||
/// Min Pattern
|
|||
/// </summary>
|
|||
private static readonly bool[,] MinPattern = |
|||
{ |
|||
{ false }, |
|||
{ false }, |
|||
{ false }, |
|||
{ true } |
|||
}; |
|||
|
|||
/// <summary>
|
|||
/// Vertical Pattern
|
|||
/// </summary>
|
|||
private static readonly bool[,] VerticalPattern = |
|||
{ |
|||
{ false, true, false, false }, |
|||
}; |
|||
|
|||
/// <summary>
|
|||
/// Forward Diagonal Pattern
|
|||
/// </summary>
|
|||
private static readonly bool[,] ForwardDiagonalPattern = |
|||
{ |
|||
{ false, false, false, true }, |
|||
{ false, false, true, false }, |
|||
{ false, true, false, false }, |
|||
{ true, false, false, false } |
|||
}; |
|||
|
|||
/// <summary>
|
|||
/// Backward Diagonal Pattern
|
|||
/// </summary>
|
|||
private static readonly bool[,] BackwardDiagonalPattern = |
|||
{ |
|||
{ true, false, false, false }, |
|||
{ false, true, false, false }, |
|||
{ false, false, true, false }, |
|||
{ false, false, false, true } |
|||
}; |
|||
|
|||
/// <summary>
|
|||
/// Create as brush that will paint a solid color
|
|||
/// </summary>
|
|||
/// <param name="color">The color.</param>
|
|||
/// <returns>A Brush</returns>
|
|||
public static SolidBrush<TPixel> Solid(TPixel color) |
|||
=> new SolidBrush<TPixel>(color); |
|||
|
|||
/// <summary>
|
|||
/// Create as brush that will paint a Percent10 Hatch Pattern within the specified colors
|
|||
/// </summary>
|
|||
/// <param name="foreColor">Color of the foreground.</param>
|
|||
/// <param name="backColor">Color of the background.</param>
|
|||
/// <returns>A Brush</returns>
|
|||
public static PatternBrush<TPixel> Percent10(TPixel foreColor, TPixel backColor) |
|||
=> new PatternBrush<TPixel>(foreColor, backColor, Percent10Pattern); |
|||
|
|||
/// <summary>
|
|||
/// Create as brush that will paint a Percent20 Hatch Pattern within the specified colors
|
|||
/// </summary>
|
|||
/// <param name="foreColor">Color of the foreground.</param>
|
|||
/// <param name="backColor">Color of the background.</param>
|
|||
/// <returns>A Brush</returns>
|
|||
public static PatternBrush<TPixel> Percent20(TPixel foreColor, TPixel backColor) |
|||
=> new PatternBrush<TPixel>(foreColor, backColor, Percent20Pattern); |
|||
|
|||
/// <summary>
|
|||
/// Create as brush that will paint a Horizontal Hatch Pattern within the specified colors
|
|||
/// </summary>
|
|||
/// <param name="foreColor">Color of the foreground.</param>
|
|||
/// <param name="backColor">Color of the background.</param>
|
|||
/// <returns>A Brush</returns>
|
|||
public static PatternBrush<TPixel> Horizontal(TPixel foreColor, TPixel backColor) |
|||
=> new PatternBrush<TPixel>(foreColor, backColor, HorizontalPattern); |
|||
|
|||
/// <summary>
|
|||
/// Create as brush that will paint a Min Hatch Pattern within the specified colors
|
|||
/// </summary>
|
|||
/// <param name="foreColor">Color of the foreground.</param>
|
|||
/// <param name="backColor">Color of the background.</param>
|
|||
/// <returns>A Brush</returns>
|
|||
public static PatternBrush<TPixel> Min(TPixel foreColor, TPixel backColor) |
|||
=> new PatternBrush<TPixel>(foreColor, backColor, MinPattern); |
|||
|
|||
/// <summary>
|
|||
/// Create as brush that will paint a Vertical Hatch Pattern within the specified colors
|
|||
/// </summary>
|
|||
/// <param name="foreColor">Color of the foreground.</param>
|
|||
/// <param name="backColor">Color of the background.</param>
|
|||
/// <returns>A Brush</returns>
|
|||
public static PatternBrush<TPixel> Vertical(TPixel foreColor, TPixel backColor) |
|||
=> new PatternBrush<TPixel>(foreColor, backColor, VerticalPattern); |
|||
|
|||
/// <summary>
|
|||
/// Create as brush that will paint a Forward Diagonal Hatch Pattern within the specified colors
|
|||
/// </summary>
|
|||
/// <param name="foreColor">Color of the foreground.</param>
|
|||
/// <param name="backColor">Color of the background.</param>
|
|||
/// <returns>A Brush</returns>
|
|||
public static PatternBrush<TPixel> ForwardDiagonal(TPixel foreColor, TPixel backColor) |
|||
=> new PatternBrush<TPixel>(foreColor, backColor, ForwardDiagonalPattern); |
|||
|
|||
/// <summary>
|
|||
/// Create as brush that will paint a Backward Diagonal Hatch Pattern within the specified colors
|
|||
/// </summary>
|
|||
/// <param name="foreColor">Color of the foreground.</param>
|
|||
/// <param name="backColor">Color of the background.</param>
|
|||
/// <returns>A Brush</returns>
|
|||
public static PatternBrush<TPixel> BackwardDiagonal(TPixel foreColor, TPixel backColor) |
|||
=> new PatternBrush<TPixel>(foreColor, backColor, BackwardDiagonalPattern); |
|||
} |
|||
} |
|||
@ -1,24 +0,0 @@ |
|||
// <copyright file="ImageBrush.cs" company="James Jackson-South">
|
|||
// Copyright (c) James Jackson-South and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
// </copyright>
|
|||
|
|||
namespace ImageSharp.Drawing.Brushes |
|||
{ |
|||
using ImageSharp.PixelFormats; |
|||
|
|||
/// <summary>
|
|||
/// Provides an implementation of a solid brush for painting with repeating images. The brush uses <see cref="Rgba32"/> for painting.
|
|||
/// </summary>
|
|||
public class ImageBrush : ImageBrush<Rgba32> |
|||
{ |
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="ImageBrush" /> class.
|
|||
/// </summary>
|
|||
/// <param name="image">The image to paint.</param>
|
|||
public ImageBrush(IImageBase<Rgba32> image) |
|||
: base(image) |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
@ -1,35 +0,0 @@ |
|||
// <copyright file="PatternBrush.cs" company="James Jackson-South">
|
|||
// Copyright (c) James Jackson-South and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
// </copyright>
|
|||
|
|||
namespace ImageSharp.Drawing.Brushes |
|||
{ |
|||
using ImageSharp.PixelFormats; |
|||
|
|||
/// <summary>
|
|||
/// Provides an implementation of a pattern brush for painting patterns. The brush use <see cref="Rgba32"/> for painting.
|
|||
/// </summary>
|
|||
public class PatternBrush : PatternBrush<Rgba32> |
|||
{ |
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="PatternBrush"/> class.
|
|||
/// </summary>
|
|||
/// <param name="foreColor">Color of the fore.</param>
|
|||
/// <param name="backColor">Color of the back.</param>
|
|||
/// <param name="pattern">The pattern.</param>
|
|||
public PatternBrush(Rgba32 foreColor, Rgba32 backColor, bool[,] pattern) |
|||
: base(foreColor, backColor, pattern) |
|||
{ |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="PatternBrush"/> class.
|
|||
/// </summary>
|
|||
/// <param name="brush">The brush.</param>
|
|||
internal PatternBrush(PatternBrush<Rgba32> brush) |
|||
: base(brush) |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
@ -1,26 +0,0 @@ |
|||
// <copyright file="RecolorBrush.cs" company="James Jackson-South">
|
|||
// Copyright (c) James Jackson-South and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
// </copyright>
|
|||
|
|||
namespace ImageSharp.Drawing.Brushes |
|||
{ |
|||
using ImageSharp.PixelFormats; |
|||
|
|||
/// <summary>
|
|||
/// Provides an implementation of a recolor brush for painting color changes.
|
|||
/// </summary>
|
|||
public class RecolorBrush : RecolorBrush<Rgba32> |
|||
{ |
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="RecolorBrush" /> class.
|
|||
/// </summary>
|
|||
/// <param name="sourceColor">Color of the source.</param>
|
|||
/// <param name="targeTPixel">Color of the target.</param>
|
|||
/// <param name="threshold">The threshold.</param>
|
|||
public RecolorBrush(Rgba32 sourceColor, Rgba32 targeTPixel, float threshold) |
|||
: base(sourceColor, targeTPixel, threshold) |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
@ -1,24 +0,0 @@ |
|||
// <copyright file="SolidBrush.cs" company="James Jackson-South">
|
|||
// Copyright (c) James Jackson-South and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
// </copyright>
|
|||
|
|||
namespace ImageSharp.Drawing.Brushes |
|||
{ |
|||
using ImageSharp.PixelFormats; |
|||
|
|||
/// <summary>
|
|||
/// Provides an implementation of a solid brush for painting solid color areas. The brush uses <see cref="Rgba32"/> for painting.
|
|||
/// </summary>
|
|||
public class SolidBrush : SolidBrush<Rgba32> |
|||
{ |
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="SolidBrush" /> class.
|
|||
/// </summary>
|
|||
/// <param name="color">The color.</param>
|
|||
public SolidBrush(Rgba32 color) |
|||
: base(color) |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
@ -1,55 +0,0 @@ |
|||
// <copyright file="Pen.cs" company="James Jackson-South">
|
|||
// Copyright (c) James Jackson-South and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
// </copyright>
|
|||
|
|||
namespace ImageSharp.Drawing.Pens |
|||
{ |
|||
using ImageSharp.PixelFormats; |
|||
|
|||
/// <summary>
|
|||
/// Represents a <see cref="Pen{TPixel}"/> in the <see cref="Rgba32"/> color space.
|
|||
/// </summary>
|
|||
public class Pen : Pen<Rgba32> |
|||
{ |
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="Pen"/> class.
|
|||
/// </summary>
|
|||
/// <param name="color">The color.</param>
|
|||
/// <param name="width">The width.</param>
|
|||
public Pen(Rgba32 color, float width) |
|||
: base(color, width) |
|||
{ |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="Pen"/> class.
|
|||
/// </summary>
|
|||
/// <param name="brush">The brush.</param>
|
|||
/// <param name="width">The width.</param>
|
|||
public Pen(IBrush<Rgba32> brush, float width) |
|||
: base(brush, width) |
|||
{ |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="Pen"/> class.
|
|||
/// </summary>
|
|||
/// <param name="brush">The brush.</param>
|
|||
/// <param name="width">The width.</param>
|
|||
/// <param name="pattern">The pattern.</param>
|
|||
public Pen(IBrush<Rgba32> brush, float width, float[] pattern) |
|||
: base(brush, width, pattern) |
|||
{ |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="Pen"/> class.
|
|||
/// </summary>
|
|||
/// <param name="pen">The pen.</param>
|
|||
internal Pen(Pen<Rgba32> pen) |
|||
: base(pen) |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
@ -1,112 +0,0 @@ |
|||
// <copyright file="Pens{TPixel}.cs" company="James Jackson-South">
|
|||
// Copyright (c) James Jackson-South and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
// </copyright>
|
|||
|
|||
namespace ImageSharp.Drawing.Pens |
|||
{ |
|||
using ImageSharp.PixelFormats; |
|||
|
|||
/// <summary>
|
|||
/// Common Pen styles
|
|||
/// </summary>
|
|||
/// <typeparam name="TPixel">The type of the color.</typeparam>
|
|||
public class Pens<TPixel> |
|||
where TPixel : struct, IPixel<TPixel> |
|||
{ |
|||
private static readonly float[] DashDotPattern = new[] { 3f, 1f, 1f, 1f }; |
|||
private static readonly float[] DashDotDotPattern = new[] { 3f, 1f, 1f, 1f, 1f, 1f }; |
|||
private static readonly float[] DottedPattern = new[] { 1f, 1f }; |
|||
private static readonly float[] DashedPattern = new[] { 3f, 1f }; |
|||
|
|||
/// <summary>
|
|||
/// Create a solid pen with out any drawing patterns
|
|||
/// </summary>
|
|||
/// <param name="color">The color.</param>
|
|||
/// <param name="width">The width.</param>
|
|||
/// <returns>The Pen</returns>
|
|||
public static Pen<TPixel> Solid(TPixel color, float width) |
|||
=> new Pen<TPixel>(color, width); |
|||
|
|||
/// <summary>
|
|||
/// Create a solid pen with out any drawing patterns
|
|||
/// </summary>
|
|||
/// <param name="brush">The brush.</param>
|
|||
/// <param name="width">The width.</param>
|
|||
/// <returns>The Pen</returns>
|
|||
public static Pen<TPixel> Solid(IBrush<TPixel> brush, float width) |
|||
=> new Pen<TPixel>(brush, width); |
|||
|
|||
/// <summary>
|
|||
/// Create a pen with a 'Dash' drawing patterns
|
|||
/// </summary>
|
|||
/// <param name="color">The color.</param>
|
|||
/// <param name="width">The width.</param>
|
|||
/// <returns>The Pen</returns>
|
|||
public static Pen<TPixel> Dash(TPixel color, float width) |
|||
=> new Pen<TPixel>(color, width, DashedPattern); |
|||
|
|||
/// <summary>
|
|||
/// Create a pen with a 'Dash' drawing patterns
|
|||
/// </summary>
|
|||
/// <param name="brush">The brush.</param>
|
|||
/// <param name="width">The width.</param>
|
|||
/// <returns>The Pen</returns>
|
|||
public static Pen<TPixel> Dash(IBrush<TPixel> brush, float width) |
|||
=> new Pen<TPixel>(brush, width, DashedPattern); |
|||
|
|||
/// <summary>
|
|||
/// Create a pen with a 'Dot' drawing patterns
|
|||
/// </summary>
|
|||
/// <param name="color">The color.</param>
|
|||
/// <param name="width">The width.</param>
|
|||
/// <returns>The Pen</returns>
|
|||
public static Pen<TPixel> Dot(TPixel color, float width) |
|||
=> new Pen<TPixel>(color, width, DottedPattern); |
|||
|
|||
/// <summary>
|
|||
/// Create a pen with a 'Dot' drawing patterns
|
|||
/// </summary>
|
|||
/// <param name="brush">The brush.</param>
|
|||
/// <param name="width">The width.</param>
|
|||
/// <returns>The Pen</returns>
|
|||
public static Pen<TPixel> Dot(IBrush<TPixel> brush, float width) |
|||
=> new Pen<TPixel>(brush, width, DottedPattern); |
|||
|
|||
/// <summary>
|
|||
/// Create a pen with a 'Dash Dot' drawing patterns
|
|||
/// </summary>
|
|||
/// <param name="color">The color.</param>
|
|||
/// <param name="width">The width.</param>
|
|||
/// <returns>The Pen</returns>
|
|||
public static Pen<TPixel> DashDot(TPixel color, float width) |
|||
=> new Pen<TPixel>(color, width, DashDotPattern); |
|||
|
|||
/// <summary>
|
|||
/// Create a pen with a 'Dash Dot' drawing patterns
|
|||
/// </summary>
|
|||
/// <param name="brush">The brush.</param>
|
|||
/// <param name="width">The width.</param>
|
|||
/// <returns>The Pen</returns>
|
|||
public static Pen<TPixel> DashDot(IBrush<TPixel> brush, float width) |
|||
=> new Pen<TPixel>(brush, width, DashDotPattern); |
|||
|
|||
/// <summary>
|
|||
/// Create a pen with a 'Dash Dot Dot' drawing patterns
|
|||
/// </summary>
|
|||
/// <param name="color">The color.</param>
|
|||
/// <param name="width">The width.</param>
|
|||
/// <returns>The Pen</returns>
|
|||
public static Pen<TPixel> DashDotDot(TPixel color, float width) |
|||
=> new Pen<TPixel>(color, width, DashDotDotPattern); |
|||
|
|||
/// <summary>
|
|||
/// Create a pen with a 'Dash Dot Dot' drawing patterns
|
|||
/// </summary>
|
|||
/// <param name="brush">The brush.</param>
|
|||
/// <param name="width">The width.</param>
|
|||
/// <returns>The Pen</returns>
|
|||
public static Pen<TPixel> DashDotDot(IBrush<TPixel> brush, float width) |
|||
=> new Pen<TPixel>(brush, width, DashDotDotPattern); |
|||
} |
|||
} |
|||
@ -1,205 +0,0 @@ |
|||
// <copyright file="BufferSpan{T}.cs" company="James Jackson-South">
|
|||
// Copyright (c) James Jackson-South and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
// </copyright>
|
|||
|
|||
namespace ImageSharp |
|||
{ |
|||
using System; |
|||
using System.Diagnostics; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
/// <summary>
|
|||
/// Represents a contiguous region of a pinned managed array.
|
|||
/// The array is usually owned by a <see cref="Buffer{T}"/> instance.
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// <see cref="BufferSpan{T}"/> is very similar to corefx System.Span<T>, and we try to maintain a compatible API.
|
|||
/// There are several differences though:
|
|||
/// - It's not possible to use it with stack objects or pointers to unmanaged memory, only with managed arrays.
|
|||
/// - It's possible to retrieve a reference to the array (<see cref="Array"/>) so we can pass it to API-s like <see cref="Marshal.Copy(byte[], int, IntPtr, int)"/>
|
|||
/// - It's possible to retrieve the pinned pointer. This enables optimized (unchecked) unsafe operations.
|
|||
/// - There is no bounds checking for performance reasons, only in debug mode. This makes <see cref="BufferSpan{T}"/> an unsafe type!
|
|||
/// </remarks>
|
|||
/// <typeparam name="T">The type of elements of the array</typeparam>
|
|||
internal unsafe struct BufferSpan<T> |
|||
where T : struct |
|||
{ |
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="BufferSpan{T}"/> struct from a pinned array and an start.
|
|||
/// </summary>
|
|||
/// <param name="array">The pinned array</param>
|
|||
/// <param name="start">The index at which to begin the span.</param>
|
|||
/// <param name="length">The length</param>
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|||
public BufferSpan(T[] array, int start, int length) |
|||
{ |
|||
GuardArray(array); |
|||
|
|||
DebugGuard.MustBeLessThanOrEqualTo(start, array.Length, nameof(start)); |
|||
DebugGuard.MustBeLessThanOrEqualTo(length, array.Length - start, nameof(length)); |
|||
|
|||
this.Array = array; |
|||
this.Length = length; |
|||
this.Start = start; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="BufferSpan{T}"/> struct from a pinned array and an start.
|
|||
/// </summary>
|
|||
/// <param name="array">The pinned array</param>
|
|||
/// <param name="start">The index at which to begin the span.</param>
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|||
public BufferSpan(T[] array, int start) |
|||
{ |
|||
GuardArray(array); |
|||
DebugGuard.MustBeLessThanOrEqualTo(start, array.Length, nameof(start)); |
|||
|
|||
this.Array = array; |
|||
this.Length = array.Length - start; |
|||
this.Start = start; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="BufferSpan{T}"/> struct from a pinned array.
|
|||
/// </summary>
|
|||
/// <param name="array">The pinned array</param>
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|||
public BufferSpan(T[] array) |
|||
{ |
|||
GuardArray(array); |
|||
|
|||
this.Array = array; |
|||
this.Start = 0; |
|||
this.Length = array.Length; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Gets the backing array.
|
|||
/// </summary>
|
|||
public T[] Array { get; private set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets the length of the <see cref="BufferSpan{T}"/>
|
|||
/// </summary>
|
|||
public int Length { get; private set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets the start inside <see cref="Array"/>
|
|||
/// </summary>
|
|||
public int Start { get; private set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets the start inside <see cref="Array"/> in bytes.
|
|||
/// </summary>
|
|||
public int ByteOffset => this.Start * Unsafe.SizeOf<T>(); |
|||
|
|||
/// <summary>
|
|||
/// Returns a reference to specified element of the span.
|
|||
/// </summary>
|
|||
/// <param name="index">The index</param>
|
|||
/// <returns>The reference to the specified element</returns>
|
|||
public ref T this[int index] |
|||
{ |
|||
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|||
get |
|||
{ |
|||
DebugGuard.MustBeLessThan(index, this.Length, nameof(index)); |
|||
ref T startRef = ref this.DangerousGetPinnableReference(); |
|||
return ref Unsafe.Add(ref startRef, index); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Converts generic <see cref="BufferSpan{T}"/> to a <see cref="BufferSpan{T}"/> of bytes
|
|||
/// setting it's <see cref="Start"/> and <see cref="Length"/> to correct values.
|
|||
/// </summary>
|
|||
/// <returns>The span of bytes</returns>
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|||
public BufferSpan<byte> AsBytes() |
|||
{ |
|||
BufferSpan<byte> result = default(BufferSpan<byte>); |
|||
result.Array = Unsafe.As<byte[]>(this.Array); |
|||
result.Start = this.Start * Unsafe.SizeOf<T>(); |
|||
result.Length = this.Length * Unsafe.SizeOf<T>(); |
|||
return result; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Returns a reference to the 0th element of the Span. If the Span is empty, returns a reference to the location where the 0th element
|
|||
/// would have been stored. Such a reference can be used for pinning but must never be dereferenced.
|
|||
/// </summary>
|
|||
/// <returns>The reference to the 0th element</returns>
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|||
public ref T DangerousGetPinnableReference() |
|||
{ |
|||
ref T origin = ref this.Array[0]; |
|||
return ref Unsafe.Add(ref origin, this.Start); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Forms a slice out of the given BufferSpan, beginning at 'start'.
|
|||
/// </summary>
|
|||
/// <param name="start">TThe index at which to begin this slice.</param>
|
|||
/// <returns>The offseted (sliced) BufferSpan</returns>
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|||
public BufferSpan<T> Slice(int start) |
|||
{ |
|||
DebugGuard.MustBeLessThan(start, this.Length, nameof(start)); |
|||
|
|||
BufferSpan<T> result = default(BufferSpan<T>); |
|||
result.Array = this.Array; |
|||
result.Start = this.Start + start; |
|||
result.Length = this.Length - start; |
|||
return result; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Forms a slice out of the given BufferSpan, beginning at 'start'.
|
|||
/// </summary>
|
|||
/// <param name="start">The index at which to begin this slice.</param>
|
|||
/// <param name="length">The desired length for the slice (exclusive).</param>
|
|||
/// <returns>The sliced BufferSpan</returns>
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|||
public BufferSpan<T> Slice(int start, int length) |
|||
{ |
|||
DebugGuard.MustBeLessThanOrEqualTo(start, this.Length, nameof(start)); |
|||
DebugGuard.MustBeLessThanOrEqualTo(length, this.Length - start, nameof(length)); |
|||
|
|||
BufferSpan<T> result = default(BufferSpan<T>); |
|||
result.Array = this.Array; |
|||
result.Start = this.Start + start; |
|||
result.Length = length; |
|||
return result; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Clears `count` elements from the beginning of the span.
|
|||
/// </summary>
|
|||
/// <param name="count">The number of elements to clear</param>
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|||
public void Clear(int count) |
|||
{ |
|||
DebugGuard.MustBeLessThanOrEqualTo(count, this.Length, nameof(count)); |
|||
|
|||
// TODO: Use Unsafe.InitBlock(ref T) for small arrays, when it get's official
|
|||
System.Array.Clear(this.Array, this.Start, count); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Clears the the span
|
|||
/// </summary>
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|||
public void Clear() |
|||
{ |
|||
this.Clear(this.Length); |
|||
} |
|||
|
|||
[Conditional("DEBUG")] |
|||
private static void GuardArray(T[] array) |
|||
{ |
|||
DebugGuard.NotNull(array, nameof(array)); |
|||
} |
|||
} |
|||
} |
|||
@ -1,55 +0,0 @@ |
|||
// <copyright file="DecodedBlockArray.cs" company="James Jackson-South">
|
|||
// Copyright (c) James Jackson-South and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
// </copyright>
|
|||
|
|||
namespace ImageSharp.Formats.Jpg |
|||
{ |
|||
using System; |
|||
using System.Buffers; |
|||
|
|||
/// <summary>
|
|||
/// Because <see cref="System.Array.Length"/> has no information for rented arrays,
|
|||
/// we need to store the count and the buffer separately when storing pooled <see cref="DecodedBlock"/> arrays.
|
|||
/// </summary>
|
|||
internal struct DecodedBlockArray : IDisposable |
|||
{ |
|||
/// <summary>
|
|||
/// The <see cref="ArrayPool{T}"/> used to pool data in <see cref="JpegDecoderCore.DecodedBlocks"/>.
|
|||
/// Should always clean arrays when returning!
|
|||
/// </summary>
|
|||
private static readonly ArrayPool<DecodedBlock> ArrayPool = ArrayPool<DecodedBlock>.Create(); |
|||
|
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="DecodedBlockArray"/> struct. Rents a buffer.
|
|||
/// </summary>
|
|||
/// <param name="count">The number of valid <see cref="DecodedBlock"/>-s</param>
|
|||
public DecodedBlockArray(int count) |
|||
{ |
|||
this.Count = count; |
|||
this.Buffer = ArrayPool.Rent(count); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Gets the number of actual <see cref="DecodedBlock"/>-s inside <see cref="Buffer"/>
|
|||
/// </summary>
|
|||
public int Count { get; } |
|||
|
|||
/// <summary>
|
|||
/// Gets the rented buffer.
|
|||
/// </summary>
|
|||
public DecodedBlock[] Buffer { get; private set; } |
|||
|
|||
/// <summary>
|
|||
/// Returns the rented buffer to the pool.
|
|||
/// </summary>
|
|||
public void Dispose() |
|||
{ |
|||
if (this.Buffer != null) |
|||
{ |
|||
ArrayPool.Return(this.Buffer, true); |
|||
this.Buffer = null; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -1,62 +0,0 @@ |
|||
// <copyright file="Image.cs" company="James Jackson-South">
|
|||
// Copyright (c) James Jackson-South and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
// </copyright>
|
|||
|
|||
namespace ImageSharp |
|||
{ |
|||
using ImageSharp.PixelFormats; |
|||
|
|||
/// <summary>
|
|||
/// Represents an image. Each pixel is a made up four 8-bit components red, green, blue, and alpha
|
|||
/// packed into a single unsigned integer value.
|
|||
/// </summary>
|
|||
public sealed partial class Image |
|||
{ |
|||
/// <summary>
|
|||
/// Create a new instance of the <see cref="Image{TPixel}"/> class
|
|||
/// with the height and the width of the image.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPixel">The pixel format.</typeparam>
|
|||
/// <param name="width">The width of the image in pixels.</param>
|
|||
/// <param name="height">The height of the image in pixels.</param>
|
|||
/// <param name="metadata">The images matadata to preload.</param>
|
|||
/// <param name="configuration">
|
|||
/// The configuration providing initialization code which allows extending the library.
|
|||
/// </param>
|
|||
/// <returns>
|
|||
/// A new <see cref="Image{TPixel}"/> unless <typeparamref name="TPixel"/> is <see cref="Rgba32"/> in which case it returns <see cref="Image" />
|
|||
/// </returns>
|
|||
internal static Image<TPixel> Create<TPixel>(int width, int height, ImageMetaData metadata, Configuration configuration) |
|||
where TPixel : struct, IPixel<TPixel> |
|||
{ |
|||
if (typeof(TPixel) == typeof(Rgba32)) |
|||
{ |
|||
return new Image(width, height, metadata, configuration) as Image<TPixel>; |
|||
} |
|||
else |
|||
{ |
|||
return new Image<TPixel>(width, height, metadata, configuration); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Create a new instance of the <see cref="Image{TPixel}"/> class
|
|||
/// with the height and the width of the image.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPixel">The pixel format.</typeparam>
|
|||
/// <param name="width">The width of the image in pixels.</param>
|
|||
/// <param name="height">The height of the image in pixels.</param>
|
|||
/// <param name="configuration">
|
|||
/// The configuration providing initialization code which allows extending the library.
|
|||
/// </param>
|
|||
/// <returns>
|
|||
/// A new <see cref="Image{TPixel}"/> unless <typeparamref name="TPixel"/> is <see cref="Rgba32"/> in which case it returns <see cref="Image" />
|
|||
/// </returns>
|
|||
internal static Image<TPixel> Create<TPixel>(int width, int height, Configuration configuration) |
|||
where TPixel : struct, IPixel<TPixel> |
|||
{ |
|||
return Image.Create<TPixel>(width, height, null, configuration); |
|||
} |
|||
} |
|||
} |
|||
@ -1,69 +0,0 @@ |
|||
// <copyright file="Image.cs" company="James Jackson-South">
|
|||
// Copyright (c) James Jackson-South and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
// </copyright>
|
|||
|
|||
namespace ImageSharp |
|||
{ |
|||
using System.Diagnostics; |
|||
using ImageSharp.PixelFormats; |
|||
|
|||
/// <summary>
|
|||
/// Represents an image. Each pixel is a made up four 8-bit components red, green, blue, and alpha
|
|||
/// packed into a single unsigned integer value.
|
|||
/// </summary>
|
|||
[DebuggerDisplay("Image: {Width}x{Height}")] |
|||
public sealed partial class Image : Image<Rgba32> |
|||
{ |
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="Image"/> class
|
|||
/// with the height and the width of the image.
|
|||
/// </summary>
|
|||
/// <param name="width">The width of the image in pixels.</param>
|
|||
/// <param name="height">The height of the image in pixels.</param>
|
|||
/// <param name="configuration">
|
|||
/// The configuration providing initialization code which allows extending the library.
|
|||
/// </param>
|
|||
public Image(int width, int height, Configuration configuration) |
|||
: base(width, height, configuration) |
|||
{ |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="Image"/> class
|
|||
/// with the height and the width of the image.
|
|||
/// </summary>
|
|||
/// <param name="width">The width of the image in pixels.</param>
|
|||
/// <param name="height">The height of the image in pixels.</param>
|
|||
public Image(int width, int height) |
|||
: this(width, height, null) |
|||
{ |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="Image"/> class
|
|||
/// by making a copy from another image.
|
|||
/// </summary>
|
|||
/// <param name="other">The other image, where the clone should be made from.</param>
|
|||
/// <exception cref="System.ArgumentNullException"><paramref name="other"/> is null.</exception>
|
|||
public Image(Image<Rgba32> other) |
|||
: base(other) |
|||
{ |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="Image"/> class
|
|||
/// with the height and the width of the image.
|
|||
/// </summary>
|
|||
/// <param name="width">The width of the image in pixels.</param>
|
|||
/// <param name="height">The height of the image in pixels.</param>
|
|||
/// <param name="metadata">The metadata.</param>
|
|||
/// <param name="configuration">
|
|||
/// The configuration providing initialization code which allows extending the library.
|
|||
/// </param>
|
|||
internal Image(int width, int height, ImageMetaData metadata, Configuration configuration) |
|||
: base(width, height, metadata, configuration) |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue