+/// Draws the specified strikethrough color to the buffer
+void DrawStrikethrough(
+ const Vector4& strikethroughColor,
+ const unsigned int bufferWidth,
+ const unsigned int bufferHeight,
+ GlyphData& glyphData,
+ const float baseline,
+ const LineRun& line,
+ const float maxStrikethroughThickness,
+ const float lineExtentLeft,
+ const float lineExtentRight,
+ float strikethroughStartingYPosition)
+{
+ uint32_t* bitmapBuffer = reinterpret_cast<uint32_t*>(glyphData.bitmapBuffer.GetBuffer());
+
+ for(unsigned int y = strikethroughStartingYPosition; y < strikethroughStartingYPosition + maxStrikethroughThickness; y++)
+ {
+ if(y > bufferHeight - 1)
+ {
+ // Do not write out of bounds.
+ break;
+ }
+
+ for(unsigned int x = glyphData.horizontalOffset + lineExtentLeft; x <= glyphData.horizontalOffset + lineExtentRight; x++)
+ {
+ if(x > bufferWidth - 1)
+ {
+ // Do not write out of bounds.
+ break;
+ }
+
+ WriteColorToPixelBuffer(glyphData, bitmapBuffer, strikethroughColor, x, y);
+ }
+ }
+}
+