Skip to content

Commit d8960b8

Browse files
Merge pull request #128 from SixLabors/js/brush-applicators
More efficient BrushApplicators
2 parents ed65674 + 1c9f579 commit d8960b8

56 files changed

Lines changed: 1262 additions & 2716 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 79 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Version: 1.6.2 (Using https://semver.org/)
2-
# Updated: 2020-11-02
1+
# Version: 2.1.0 (Using https://semver.org/)
2+
# Updated: 2021-03-03
33
# See https://github.com/RehanSaeed/EditorConfig/releases for release notes.
44
# See https://github.com/RehanSaeed/EditorConfig for updates to this file.
55
# See http://EditorConfig.org for more information about .editorconfig files.
@@ -60,87 +60,84 @@ indent_size = 2
6060
[*.{cmd,bat}]
6161
end_of_line = crlf
6262

63+
# Bash Files
64+
[*.sh]
65+
end_of_line = lf
66+
6367
# Makefiles
6468
[Makefile]
6569
indent_style = tab
6670

6771
##########################################
68-
# File Header (Uncomment to support file headers)
69-
# https://docs.microsoft.com/visualstudio/ide/reference/add-file-header
72+
# Default .NET Code Style Severities
73+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/configuration-options#scope
7074
##########################################
7175

72-
# [*.{cs,csx,cake,vb,vbx,tt,ttinclude}]
73-
file_header_template = Copyright (c) Six Labors.\nLicensed under the Apache License, Version 2.0.
74-
75-
# SA1636: File header copyright text should match
76-
# Justification: .editorconfig supports file headers. If this is changed to a value other than "none", a stylecop.json file will need to added to the project.
77-
# dotnet_diagnostic.SA1636.severity = none
76+
[*.{cs,csx,cake,vb,vbx}]
77+
# Default Severity for all .NET Code Style rules below
78+
dotnet_analyzer_diagnostic.severity = warning
7879

7980
##########################################
80-
# .NET Language Conventions
81-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions
81+
# Language Rules
82+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules
8283
##########################################
8384

84-
# .NET Code Style Settings
85-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#net-code-style-settings
85+
# .NET Style Rules
86+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules#net-style-rules
8687
[*.{cs,csx,cake,vb,vbx}]
8788
# "this." and "Me." qualifiers
88-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#this-and-me
8989
dotnet_style_qualification_for_field = true:warning
9090
dotnet_style_qualification_for_property = true:warning
9191
dotnet_style_qualification_for_method = true:warning
9292
dotnet_style_qualification_for_event = true:warning
9393
# Language keywords instead of framework type names for type references
94-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#language-keywords
9594
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
9695
dotnet_style_predefined_type_for_member_access = true:warning
9796
# Modifier preferences
98-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#normalize-modifiers
9997
dotnet_style_require_accessibility_modifiers = always:warning
10098
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning
10199
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:warning
102100
dotnet_style_readonly_field = true:warning
103101
# Parentheses preferences
104-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#parentheses-preferences
105102
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
106103
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning
107104
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
108-
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
105+
dotnet_style_parentheses_in_other_operators = always_for_clarity:suggestion
109106
# Expression-level preferences
110-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-level-preferences
111107
dotnet_style_object_initializer = true:warning
112108
dotnet_style_collection_initializer = true:warning
113109
dotnet_style_explicit_tuple_names = true:warning
114110
dotnet_style_prefer_inferred_tuple_names = true:warning
115111
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
116112
dotnet_style_prefer_auto_properties = true:warning
117-
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
118113
dotnet_style_prefer_conditional_expression_over_assignment = false:suggestion
114+
dotnet_diagnostic.IDE0045.severity = suggestion
119115
dotnet_style_prefer_conditional_expression_over_return = false:suggestion
116+
dotnet_diagnostic.IDE0046.severity = suggestion
120117
dotnet_style_prefer_compound_assignment = true:warning
118+
dotnet_style_prefer_simplified_interpolation = true:warning
119+
dotnet_style_prefer_simplified_boolean_expressions = true:warning
121120
# Null-checking preferences
122-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#null-checking-preferences
123121
dotnet_style_coalesce_expression = true:warning
124122
dotnet_style_null_propagation = true:warning
125-
# Parameter preferences
126-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#parameter-preferences
127-
dotnet_code_quality_unused_parameters = all:warning
128-
# More style options (Undocumented)
129-
# https://github.com/MicrosoftDocs/visualstudio-docs/issues/3641
123+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
124+
# File header preferences
125+
file_header_template = Copyright (c) Six Labors.\nLicensed under the Apache License, Version 2.0.
126+
# SA1636: File header copyright text should match
127+
# Justification: .editorconfig supports file headers. If this is changed to a value other than "none", a stylecop.json file will need to added to the project.
128+
# dotnet_diagnostic.SA1636.severity = none
129+
130+
# Undocumented
130131
dotnet_style_operator_placement_when_wrapping = end_of_line
131-
# https://github.com/dotnet/roslyn/pull/40070
132-
dotnet_style_prefer_simplified_interpolation = true:warning
133132

134-
# C# Code Style Settings
135-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#c-code-style-settings
133+
# C# Style Rules
134+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules#c-style-rules
136135
[*.{cs,csx,cake}]
137-
# Implicit and explicit types
138-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#implicit-and-explicit-types
136+
# 'var' preferences
139137
csharp_style_var_for_built_in_types = never
140138
csharp_style_var_when_type_is_apparent = true:warning
141139
csharp_style_var_elsewhere = false:warning
142140
# Expression-bodied members
143-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-bodied-members
144141
csharp_style_expression_bodied_methods = true:warning
145142
csharp_style_expression_bodied_constructors = true:warning
146143
csharp_style_expression_bodied_operators = true:warning
@@ -149,47 +146,64 @@ csharp_style_expression_bodied_indexers = true:warning
149146
csharp_style_expression_bodied_accessors = true:warning
150147
csharp_style_expression_bodied_lambdas = true:warning
151148
csharp_style_expression_bodied_local_functions = true:warning
152-
# Pattern matching
153-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#pattern-matching
149+
# Pattern matching preferences
154150
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
155151
csharp_style_pattern_matching_over_as_with_null_check = true:warning
156-
# Inlined variable declarations
157-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#inlined-variable-declarations
158-
csharp_style_inlined_variable_declaration = true:warning
152+
csharp_style_prefer_switch_expression = true:warning
153+
csharp_style_prefer_pattern_matching = true:warning
154+
csharp_style_prefer_not_pattern = true:warning
159155
# Expression-level preferences
160-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-level-preferences
156+
csharp_style_inlined_variable_declaration = true:warning
161157
csharp_prefer_simple_default_expression = true:warning
158+
csharp_style_pattern_local_over_anonymous_function = true:warning
159+
csharp_style_deconstructed_variable_declaration = true:warning
160+
csharp_style_prefer_index_operator = true:warning
161+
csharp_style_prefer_range_operator = true:warning
162+
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
162163
# "Null" checking preferences
163-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#c-null-checking-preferences
164164
csharp_style_throw_expression = true:warning
165165
csharp_style_conditional_delegate_call = true:warning
166166
# Code block preferences
167-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#code-block-preferences
168167
csharp_prefer_braces = true:warning
169-
# Unused value preferences
170-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#unused-value-preferences
171-
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
172-
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
173-
# Index and range preferences
174-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#index-and-range-preferences
175-
csharp_style_prefer_index_operator = true:warning
176-
csharp_style_prefer_range_operator = true:warning
177-
# Miscellaneous preferences
178-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#miscellaneous-preferences
179-
csharp_style_deconstructed_variable_declaration = true:warning
180-
csharp_style_pattern_local_over_anonymous_function = true:warning
168+
csharp_prefer_simple_using_statement = true:suggestion
169+
dotnet_diagnostic.IDE0063.severity = suggestion
170+
# 'using' directive preferences
181171
csharp_using_directive_placement = outside_namespace:warning
172+
# Modifier preferences
182173
csharp_prefer_static_local_function = true:warning
183-
csharp_prefer_simple_using_statement = true:suggestion
184174

185175
##########################################
186-
# .NET Formatting Conventions
187-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-code-style-settings-reference#formatting-conventions
176+
# Unnecessary Code Rules
177+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/unnecessary-code-rules
188178
##########################################
189179

190-
# Organize usings
191-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#organize-using-directives
180+
# .NET Unnecessary code rules
181+
[*.{cs,csx,cake,vb,vbx}]
182+
dotnet_code_quality_unused_parameters = all:warning
183+
dotnet_remove_unnecessary_suppression_exclusions = none:warning
184+
185+
# C# Unnecessary code rules
186+
[*.{cs,csx,cake}]
187+
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
188+
dotnet_diagnostic.IDE0058.severity = suggestion
189+
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
190+
dotnet_diagnostic.IDE0059.severity = suggestion
191+
192+
##########################################
193+
# Formatting Rules
194+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules
195+
##########################################
196+
197+
# .NET formatting rules
198+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#net-formatting-rules
199+
[*.{cs,csx,cake,vb,vbx}]
200+
# Organize using directives
192201
dotnet_sort_system_directives_first = true
202+
dotnet_separate_import_directive_groups = false
203+
204+
# C# formatting rules
205+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#c-formatting-rules
206+
[*.{cs,csx,cake}]
193207
# Newline options
194208
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#new-line-options
195209
csharp_new_line_before_open_brace = all
@@ -231,14 +245,14 @@ csharp_space_around_declaration_statements = false
231245
csharp_space_before_open_square_brackets = false
232246
csharp_space_between_empty_square_brackets = false
233247
csharp_space_between_square_brackets = false
234-
# Wrapping options
248+
# Wrap options
235249
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#wrap-options
236250
csharp_preserve_single_line_statements = false
237251
csharp_preserve_single_line_blocks = true
238252

239253
##########################################
240-
# .NET Naming Conventions
241-
# https://docs.microsoft.com/visualstudio/ide/editorconfig-naming-conventions
254+
# .NET Naming Rules
255+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/naming-rules
242256
##########################################
243257

244258
[*.{cs,csx,cake,vb,vbx}]
@@ -261,8 +275,9 @@ dotnet_naming_style.prefix_type_parameters_with_t_style.capitalization = pascal_
261275
dotnet_naming_style.prefix_type_parameters_with_t_style.required_prefix = T
262276
# disallowed_style - Anything that has this style applied is marked as disallowed
263277
dotnet_naming_style.disallowed_style.capitalization = pascal_case
264-
dotnet_naming_style.disallowed_style.required_prefix = ____RULE_VIOLATION____
265-
dotnet_naming_style.disallowed_style.required_suffix = ____RULE_VIOLATION____
278+
# Disabled while we investigate compatibility with VS 16.10
279+
#dotnet_naming_style.disallowed_style.required_prefix = ____RULE_VIOLATION____
280+
#dotnet_naming_style.disallowed_style.required_suffix = ____RULE_VIOLATION____
266281
# internal_error_style - This style should never occur... if it does, it indicates a bug in file or in the parser using the file
267282
dotnet_naming_style.internal_error_style.capitalization = pascal_case
268283
dotnet_naming_style.internal_error_style.required_prefix = ____INTERNAL_ERROR____

.gitattributes

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# normalize to Unix-style line endings
55
###############################################################################
66
* text eol=lf
7-
87
###############################################################################
98
# Set explicit file behavior to:
109
# treat as text and
@@ -54,15 +53,13 @@
5453
*.txt text eol=lf
5554
*.vb text eol=lf
5655
*.yml text eol=lf
57-
5856
###############################################################################
5957
# Set explicit file behavior to:
6058
# treat as text
6159
# normalize to Unix-style line endings and
6260
# diff as csharp
6361
###############################################################################
6462
*.cs text eol=lf diff=csharp
65-
6663
###############################################################################
6764
# Set explicit file behavior to:
6865
# treat as text
@@ -74,48 +71,35 @@
7471
*.fsproj text eol=lf merge=union
7572
*.ncrunchproject text eol=lf merge=union
7673
*.vbproj text eol=lf merge=union
77-
7874
###############################################################################
7975
# Set explicit file behavior to:
8076
# treat as text
8177
# normalize to Windows-style line endings and
8278
# use a union merge when resoling conflicts
8379
###############################################################################
8480
*.sln text eol=crlf merge=union
85-
8681
###############################################################################
8782
# Set explicit file behavior to:
8883
# treat as binary
8984
###############################################################################
9085
*.basis binary
91-
*.bmp binary
92-
*.dds binary
9386
*.dll binary
9487
*.eot binary
9588
*.exe binary
96-
*.gif binary
97-
*.jpg binary
98-
*.ktx binary
9989
*.otf binary
10090
*.pbm binary
10191
*.pdf binary
102-
*.png binary
10392
*.ppt binary
10493
*.pptx binary
10594
*.pvr binary
10695
*.snk binary
107-
*.tga binary
108-
*.tif binary
109-
*.tiff binary
11096
*.ttc binary
11197
*.ttf binary
11298
*.wbmp binary
113-
*.webp binary
11499
*.woff binary
115100
*.woff2 binary
116101
*.xls binary
117102
*.xlsx binary
118-
119103
###############################################################################
120104
# Set explicit file behavior to:
121105
# diff as plain text
@@ -127,3 +111,18 @@
127111
*.pptx diff=astextplain
128112
*.rtf diff=astextplain
129113
*.svg diff=astextplain
114+
###############################################################################
115+
# Handle image files by git lfs
116+
###############################################################################
117+
*.jpg filter=lfs diff=lfs merge=lfs -text
118+
*.jpeg filter=lfs diff=lfs merge=lfs -text
119+
*.bmp filter=lfs diff=lfs merge=lfs -text
120+
*.gif filter=lfs diff=lfs merge=lfs -text
121+
*.png filter=lfs diff=lfs merge=lfs -text
122+
*.tif filter=lfs diff=lfs merge=lfs -text
123+
*.tiff filter=lfs diff=lfs merge=lfs -text
124+
*.tga filter=lfs diff=lfs merge=lfs -text
125+
*.webp filter=lfs diff=lfs merge=lfs -text
126+
*.dds filter=lfs diff=lfs merge=lfs -text
127+
*.ktx filter=lfs diff=lfs merge=lfs -text
128+
*.ktx2 filter=lfs diff=lfs merge=lfs -text

0 commit comments

Comments
 (0)