Skip to content

Commit 0ccea4d

Browse files
Merge pull request #186 from SixLabors/js/version-bump
Update references
2 parents 0e586c3 + 8f974dd commit 0ccea4d

20 files changed

Lines changed: 64 additions & 86 deletions

src/ImageSharp.Drawing/ImageSharp.Drawing.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
1313
<PackageTags>Image Draw Shape Path Font</PackageTags>
1414
<Description>An extension to ImageSharp that allows the drawing of images, paths, and text.</Description>
15-
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;netstandard1.3;net472</TargetFrameworks>
15+
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1;netstandard2.1;netstandard2.0;net472</TargetFrameworks>
1616
</PropertyGroup>
1717

1818
<ItemGroup>
1919
<None Include="..\..\shared-infrastructure\branding\icons\imagesharp.drawing\sixlabors.imagesharp.drawing.128.png" Pack="true" PackagePath="" />
2020
</ItemGroup>
2121

2222
<ItemGroup>
23-
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-beta15.23" />
24-
<PackageReference Include="SixLabors.ImageSharp" Version="2.0.0-alpha.0.123" />
23+
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-beta15.24" />
24+
<PackageReference Include="SixLabors.ImageSharp" Version="2.0.0-alpha.0.142" />
2525
</ItemGroup>
2626

2727
<Import Project="..\..\shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.projitems" Label="Shared" />

src/ImageSharp.Drawing/Processing/GradientBrush.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public override void Apply(Span<float> scanline, int x, int y)
159159
}
160160
}
161161

162-
Span<TPixel> destinationRow = this.Target.GetPixelRowSpan(y).Slice(x, scanline.Length);
162+
Span<TPixel> destinationRow = this.Target.PixelBuffer.DangerousGetRowSpan(y).Slice(x, scanline.Length);
163163
this.Blender.Blend(this.Configuration, destinationRow, destinationRow, overlays, amounts);
164164
}
165165

src/ImageSharp.Drawing/Processing/ImageBrush.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public override void Apply(Span<float> scanline, int x, int y)
162162

163163
int offsetX = x - this.offsetX;
164164
int sourceY = ((y - this.offsetY) % this.sourceRegion.Width) + this.sourceRegion.Y;
165-
Span<TPixel> sourceRow = this.sourceFrame.GetPixelRowSpan(sourceY);
165+
Span<TPixel> sourceRow = this.sourceFrame.PixelBuffer.DangerousGetRowSpan(sourceY);
166166

167167
for (int i = 0; i < scanline.Length; i++)
168168
{
@@ -173,7 +173,7 @@ public override void Apply(Span<float> scanline, int x, int y)
173173
overlaySpan[i] = sourceRow[sourceX];
174174
}
175175

176-
Span<TPixel> destinationRow = this.Target.GetPixelRowSpan(y).Slice(x, scanline.Length);
176+
Span<TPixel> destinationRow = this.Target.PixelBuffer.DangerousGetRowSpan(y).Slice(x, scanline.Length);
177177
this.Blender.Blend(
178178
this.Configuration,
179179
destinationRow,

src/ImageSharp.Drawing/Processing/PathGradientBrush.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ public override void Apply(Span<float> scanline, int x, int y)
302302
}
303303
}
304304

305-
Span<TPixel> destinationRow = this.Target.GetPixelRowSpan(y).Slice(x, scanline.Length);
305+
Span<TPixel> destinationRow = this.Target.PixelBuffer.DangerousGetRowSpan(y).Slice(x, scanline.Length);
306306
this.Blender.Blend(this.Configuration, destinationRow, destinationRow, overlays, amounts);
307307
}
308308

src/ImageSharp.Drawing/Processing/PatternBrush.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public override void Apply(Span<float> scanline, int x, int y)
159159
overlays[i] = this.pattern[patternY, patternX];
160160
}
161161

162-
Span<TPixel> destinationRow = this.Target.GetPixelRowSpan(y).Slice(x, scanline.Length);
162+
Span<TPixel> destinationRow = this.Target.PixelBuffer.DangerousGetRowSpan(y).Slice(x, scanline.Length);
163163
this.Blender.Blend(
164164
this.Configuration,
165165
destinationRow,

src/ImageSharp.Drawing/Processing/Processors/Drawing/FillPathProcessor{TPixel}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ protected override void OnFrameApply(ImageFrame<TPixel> source)
121121
{
122122
if (hasOnes)
123123
{
124-
source.GetPixelRowSpan(y).Slice(minX, scanlineWidth).Fill(solidBrushColor);
124+
source.PixelBuffer.DangerousGetRowSpan(y).Slice(minX, scanlineWidth).Fill(solidBrushColor);
125125
}
126126

127127
continue;

src/ImageSharp.Drawing/Processing/Processors/Drawing/FillProcessor{TPixel}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public void Invoke(in RowInterval rows)
102102
{
103103
for (int y = rows.Min; y < rows.Max; y++)
104104
{
105-
this.source.GetPixelRowSpan(y).Slice(this.bounds.X, this.bounds.Width).Fill(this.color);
105+
this.source.PixelBuffer.DangerousGetRowSpan(y).Slice(this.bounds.X, this.bounds.Width).Fill(this.color);
106106
}
107107
}
108108
}

src/ImageSharp.Drawing/Processing/Processors/Text/DrawTextProcessor{TPixel}.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void Draw(List<DrawingOperation> operations, IBrush brush)
127127
for (int row = firstRow; row < end; row++)
128128
{
129129
int y = startY + row;
130-
Span<float> span = buffer.GetRowSpan(row).Slice(offsetSpan);
130+
Span<float> span = buffer.DangerousGetRowSpan(row).Slice(offsetSpan);
131131
currentApp.Apply(span, startX, y);
132132
}
133133
}
@@ -372,7 +372,7 @@ private Buffer2D<float> Render(IPath path)
372372
{
373373
while (scanner.MoveToNextPixelLine())
374374
{
375-
Span<float> scanline = fullBuffer.GetRowSpan(scanner.PixelLineY);
375+
Span<float> scanline = fullBuffer.DangerousGetRowSpan(scanner.PixelLineY);
376376
bool scanlineDirty = scanner.ScanCurrentPixelLineInto(0, xOffset, scanline);
377377

378378
if (scanlineDirty && !graphicsOptions.Antialias)

src/ImageSharp.Drawing/Processing/RecolorBrush.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public override void Apply(Span<float> scanline, int x, int y)
143143
overlays[i] = this[offsetX, y];
144144
}
145145

146-
Span<TPixel> destinationRow = this.Target.GetPixelRowSpan(y).Slice(x, scanline.Length);
146+
Span<TPixel> destinationRow = this.Target.PixelBuffer.DangerousGetRowSpan(y).Slice(x, scanline.Length);
147147
this.Blender.Blend(
148148
this.Configuration,
149149
destinationRow,

src/ImageSharp.Drawing/Processing/SolidBrush.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public SolidBrushApplicator(
7373
/// <inheritdoc />
7474
public override void Apply(Span<float> scanline, int x, int y)
7575
{
76-
Span<TPixel> destinationRow = this.Target.GetPixelRowSpan(y).Slice(x);
76+
Span<TPixel> destinationRow = this.Target.PixelBuffer.DangerousGetRowSpan(y).Slice(x);
7777

7878
// Constrain the spans to each other
7979
if (destinationRow.Length > scanline.Length)

0 commit comments

Comments
 (0)