| 158 | } |
| 159 | |
| 160 | f32 J2DPrint::getWidth(const char* format, ...) |
| 161 | { |
| 162 | initchar(); |
| 163 | va_list args; |
| 164 | va_start(args, format); |
| 165 | TSize size; |
| 166 | |
| 167 | int len = vsnprintf((char*)mStrBuff, mStrBuffSize, format, args); |
| 168 | if (len < 0 || len > mStrBuffSize) { |
| 169 | len = mStrBuffSize; |
| 170 | } |
| 171 | parse(mStrBuff, len, 0x7fffffff, nullptr, size, 255, false); |
| 172 | return size.mWidth; |
| 173 | } |
| 174 | |
| 175 | void J2DPrint::printReturn(const char* str, f32 x, f32 y, J2DTextBoxHBinding hbind, J2DTextBoxVBinding vbind, f32 x2, f32 y2, u8 alpha) |
| 176 | { |
no test coverage detected