Skip to contents

The part of a ring between two angles, clockwise from the top, with its tooltip. It stops 1 pixel short of each end, so that two parts side by side are 2 pixels apart, as far at the inner edge as at the outer. A part too small for its gaps draws nothing.

Usage

ring_path(cx, cy, r_out, r_in, from, to, fill, tip)

Arguments

cx, cy

The centre of the ring, in pixels.

r_out, r_in

The outer and the inner radius, in pixels.

from, to

Where the part starts and ends: angles in radians, clockwise from the top.

fill

The colour.

tip

The text of the tooltip.

Value

A <path> element, as a character string, or "".

Examples

rghcard:::ring_path(200, 318, 54, 37, 0, pi / 2, "#198CE7", "R: 1,781 commits (25%)")
#> [1] "<path d=\"M201.00,264.01 A54.00,54.00 0 0 1 253.99,317.00 L236.99,317.00 A37.00,37.00 0 0 0 201.00,281.01 Z\" fill=\"#198CE7\"><title>R: 1,781 commits (25%)</title></path>"