Merge pull request #1945 from idotobi/pen-highlighter-cursor-use-actual-size

Use correct size for pen/highlighter cursors
presentation
Ulrich Huber 6 years ago committed by GitHub
commit e548cffbcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/gui/XournalppCursor.cpp

@ -421,9 +421,10 @@ auto XournalppCursor::createHighlighterOrPenCursor(int size, double alpha) -> Gd
cairo_stroke(cr);
}
cairo_set_source_rgba(cr, r, g, b, alpha);
// Correct the offset of the coloured dot for big-cursor mode
cairo_rectangle(cr, centerX, centerY, size, size);
double cursorSize = control->getToolHandler()->getThickness() * control->getZoomControl()->getZoom();
cairo_arc(cr, centerX, centerY, cursorSize / 2., 0, 2. * M_PI);
cairo_fill(cr);
cairo_destroy(cr);
GdkPixbuf* pixbuf = xoj_pixbuf_get_from_surface(crCursor, 0, 0, width, height);

Loading…
Cancel
Save