mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
box-drawing: thickness(): tag as CONST, convert point-size to a float
This commit is contained in:
parent
973a57a096
commit
8b1e702827
1 changed files with 4 additions and 3 deletions
|
|
@ -6,14 +6,15 @@
|
|||
#define LOG_MODULE "box-drawing"
|
||||
#define LOG_ENABLE_DBG 1
|
||||
#include "log.h"
|
||||
#include "macros.h"
|
||||
#include "stride.h"
|
||||
#include "terminal.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
static int
|
||||
thickness(int pts, int dpi)
|
||||
static int CONST
|
||||
thickness(float pts, int dpi)
|
||||
{
|
||||
return pts * dpi / 72;
|
||||
return pts * (float)dpi / 72.0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue