浏览代码

Detected some pixel-errors due to rounding issues on position

pull/2253/head
raysan5 3 年前
父节点
当前提交
803ce9f44b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      src/rtext.c

+ 2
- 2
src/rtext.c 查看文件

@ -922,8 +922,8 @@ void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSiz
// Character destination rectangle on screen
// NOTE: We consider glyphPadding on drawing
Rectangle dstRec = { position.x + font.glyphs[index].offsetX*scaleFactor - (float)font.glyphPadding*scaleFactor,
position.y + font.glyphs[index].offsetY*scaleFactor - (float)font.glyphPadding*scaleFactor,
Rectangle dstRec = { p">(int)position.x + font.glyphs[index].offsetX*scaleFactor - (float)font.glyphPadding*scaleFactor,
p">(int)position.y + font.glyphs[index].offsetY*scaleFactor - (float)font.glyphPadding*scaleFactor,
(font.recs[index].width + 2.0f*font.glyphPadding)*scaleFactor,
(font.recs[index].height + 2.0f*font.glyphPadding)*scaleFactor };

正在加载...
取消
保存