mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-15 05:33:58 -04: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_MODULE "box-drawing"
|
||||||
#define LOG_ENABLE_DBG 1
|
#define LOG_ENABLE_DBG 1
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
#include "macros.h"
|
||||||
#include "stride.h"
|
#include "stride.h"
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
|
||||||
static int
|
static int CONST
|
||||||
thickness(int pts, int dpi)
|
thickness(float pts, int dpi)
|
||||||
{
|
{
|
||||||
return pts * dpi / 72;
|
return pts * (float)dpi / 72.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue