Skip to content

Commit

Permalink
Directly compose superscripts in difference operators. For ravel #589.
Browse files Browse the repository at this point in the history
  • Loading branch information
highperformancecoder committed Jun 11, 2024
1 parent 1ac86d8 commit 9a85abe
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions model/operation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -974,8 +974,6 @@ namespace minsky
}
template <> void Operation<OperationType::floor>::iconDraw(cairo_t* cairo) const
{
//cairo::CairoSave cs(cairo);
//cairo_set_source_rgb(cairo,0,0,0);
const double sf = scaleFactor();
cairo_move_to(cairo,-5,-5);
// what we're trying to draw, but Windows' deficient fontsets don't allow it
Expand Down Expand Up @@ -1231,18 +1229,24 @@ namespace minsky
{
const double sf = scaleFactor();
cairo_move_to(cairo,-4,-7);
setCachedText(cairo, "Δ",7);
setCachedText(cairo, "Δ",7);
cairo_scale(cairo,sf,sf);
cachedPango->show();
cairo_move_to(cairo,-4+cachedPango->width(),-7);
setCachedText(cairo, "-",4);
cachedPango->show();
}

template <> void Operation<OperationType::differencePlus>::iconDraw(cairo_t* cairo) const
{
const double sf = scaleFactor();
cairo_move_to(cairo,-4,-7);
setCachedText(cairo, "Δ",7);
setCachedText(cairo, "Δ",7);
cairo_scale(cairo,sf,sf);
cachedPango->show();
cairo_move_to(cairo,-4+cachedPango->width(),-7);
setCachedText(cairo, "+",4);
cachedPango->show();
}

template <> void Operation<OperationType::innerProduct>::iconDraw(cairo_t* cairo) const
Expand Down

0 comments on commit 9a85abe

Please sign in to comment.