mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-26 09:21:06 +01:00
[hvgl] Make axis value setting work
Yay!
This commit is contained in:
1 parent
1949eb8de7
commit
be6f51fbca
2 files changed
+10
-9
No files matched your search
@@ -79,11 +79,12 @@ PartShape::get_path_at (const struct hvgl &hvgl,
|
||||
{
|
||||
unsigned axis_index = _.first;
|
||||
float coord = _.second;
|
||||
bool pos = coord > 0;
|
||||
if (!coord) continue;
|
||||
bool pos = coord >= 0;
|
||||
double scalar = fabsf (coord);
|
||||
double scalar = fabs(coord);
|
||||
unsigned column_idx = axis_index * 2 + pos;
|
||||
|
||||
const auto delta = deltas.get_column (axis_index * 2 + pos, axisCount, segmentCount);
|
||||
const auto delta = deltas.get_column (column_idx, axisCount, segmentCount);
|
||||
unsigned count = hb_min (v.length, delta.length);
|
||||
for (unsigned i = 0; i < count; i++)
|
||||
v.arrayZ[i] += scalar * delta.arrayZ[i];
|
||||
|
||||
@@ -179,18 +179,18 @@ struct ExtremumColumnStarts
|
||||
const auto &extremumRowIndex = StructAfter<decltype (extremumRowIndexX)> (masterRowIndex, master_axis_value_deltas.length);
|
||||
hb_array_t<const HBUINT16LE> extremum_row_index = extremumRowIndex.as_array (extremum_axis_value_deltas.length);
|
||||
|
||||
for (unsigned col_idx = 0; col_idx < 2 * axis_count; col_idx++)
|
||||
for (unsigned column_idx = 0; column_idx < 2 * axis_count; column_idx++)
|
||||
{
|
||||
const auto &sparse_row_start = extremumColumnStart[col_idx];
|
||||
const auto &sparse_row_end = extremumColumnStart[col_idx + 1];
|
||||
const auto &sparse_row_start = extremumColumnStart[column_idx];
|
||||
const auto &sparse_row_end = extremumColumnStart[column_idx + 1];
|
||||
|
||||
if (sparse_row_start == sparse_row_end)
|
||||
continue;
|
||||
|
||||
bool pos = col_idx & 1;
|
||||
unsigned axis_idx = col_idx / 2;
|
||||
bool pos = column_idx & 1;
|
||||
unsigned axis_idx = column_idx / 2;
|
||||
float coord = coords[axis_idx];
|
||||
if (!coord || (pos ^ (coord < 0)))
|
||||
if (!coord || (pos != (coord > 0)))
|
||||
continue;
|
||||
float scalar = fabsf (coord);
|
||||
|
||||
|
||||
Reference in new issue
Block a user