git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Usermode/Build - Updates to build system for crtbegin/crtend
[tpg/acess2.git]
/
Usermode
/
Applications
/
axwin3_src
/
WM
/
wm_render_text.c
diff --git
a/Usermode/Applications/axwin3_src/WM/wm_render_text.c
b/Usermode/Applications/axwin3_src/WM/wm_render_text.c
index
362669b
..
4ce35cb
100644
(file)
--- a/
Usermode/Applications/axwin3_src/WM/wm_render_text.c
+++ b/
Usermode/Applications/axwin3_src/WM/wm_render_text.c
@@
-78,13
+78,19
@@
int WM_Render_DrawText(tWindow *Window, int X, int Y, int W, int H, tFont *Font,
if(!Text) return 0;
if(!Text) return 0;
+
+ X += Window->BorderL;
+ Y += Window->BorderT;
+
// Check the bounds
// Check the bounds
- if(W < 0 || X < 0 || X >= Window->
W)
return 0;
- if(X + W > Window->
W) W = Window->
W - X;
+ if(W < 0 || X < 0 || X >= Window->
RealW)
return 0;
+ if(X + W > Window->
RealW) W = Window->Real
W - X;
- if(H < 0 || Y < 0 || Y >= Window->
H)
return 0;
- if(Y + H > Window->
H) H = Window->
H - Y;
+ if(H < 0 || Y < 0 || Y >= Window->
RealH)
return 0;
+ if(Y + H > Window->
RealH) H = Window->Real
H - Y;
+ // TODO: Catch trampling of decorations
+
// Handle NULL font (system default monospace)
if( !Font ) Font = &gSystemFont;
// Handle NULL font (system default monospace)
if( !Font ) Font = &gSystemFont;
@@
-239,7
+245,7
@@
void _RenderGlyph(tWindow *Window, short X, short Y, tGlyph *Glyph, uint32_t Col
}
// _SysDebug("X = %i, Y = %i", X, Y);
}
// _SysDebug("X = %i, Y = %i", X, Y);
- outBuf = (uint32_t*)Window->RenderBuffer + Y*Window->W + X;
+ outBuf = (uint32_t*)Window->RenderBuffer + Y*Window->
Real
W + X;
inBuf = Glyph->Bitmap + yStart*Glyph->TrueWidth;
for( y = yStart; y < Glyph->TrueHeight; y ++ )
inBuf = Glyph->Bitmap + yStart*Glyph->TrueWidth;
for( y = yStart; y < Glyph->TrueHeight; y ++ )
@@
-248,7
+254,7
@@
void _RenderGlyph(tWindow *Window, short X, short Y, tGlyph *Glyph, uint32_t Col
{
outBuf[dst_x] = Video_AlphaBlend( outBuf[dst_x], Color, inBuf[x] );
}
{
outBuf[dst_x] = Video_AlphaBlend( outBuf[dst_x], Color, inBuf[x] );
}
- outBuf += Window->W;
+ outBuf += Window->
Real
W;
inBuf += Glyph->TrueWidth;
}
}
inBuf += Glyph->TrueWidth;
}
}
UCC
git Repository :: git.ucc.asn.au