mirror of https://github.com/adamdruppe/arsd.git
Refactor blocks
This commit is contained in:
parent
23e3d59538
commit
486195859c
|
@ -219,14 +219,14 @@ private struct OriginRectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private {
|
|
||||||
|
|
||||||
@safe pure nothrow @nogc:
|
@safe pure nothrow @nogc:
|
||||||
|
|
||||||
|
// misc
|
||||||
|
private {
|
||||||
Point pos(Rectangle r) => r.upperLeft;
|
Point pos(Rectangle r) => r.upperLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Alpha-blending functions
|
// ==== Alpha-blending functions ====
|
||||||
@safe pure nothrow @nogc {
|
|
||||||
|
|
||||||
///
|
///
|
||||||
public void alphaBlend(scope Pixel[] target, scope const Pixel[] source) @trusted
|
public void alphaBlend(scope Pixel[] target, scope const Pixel[] source) @trusted
|
||||||
|
@ -249,10 +249,8 @@ private {
|
||||||
px = cast(ubyte)(d + s);
|
px = cast(ubyte)(d + s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Drawing functions
|
// ==== Drawing functions ====
|
||||||
@safe pure nothrow @nogc {
|
|
||||||
|
|
||||||
/++
|
/++
|
||||||
Draws a single pixel
|
Draws a single pixel
|
||||||
|
@ -406,4 +404,3 @@ private {
|
||||||
= sheet.pixmap.sliceAt(Point(drawingSource.x, y + drawingSource.y), drawingWidth);
|
= sheet.pixmap.sliceAt(Point(drawingSource.x, y + drawingSource.y), drawingWidth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue