DOI-USGS / gage-conditions-gif

Creative Commons Zero v1.0 Universal
17 stars 11 forks source link

Callout polygons #77

Closed aappling-usgs closed 6 years ago

aappling-usgs commented 6 years ago

This should be ready to go as soon as I get feedback on Slack about square vs round corners on the text boxes. Here are the examples with round text boxes, using Marty's smoothed-out polygons, and with text moved around to fit better with the polygons and legends:

frame_20171215_00 frame_20180221_00 frame_20180710_00 frame_20180916_00 frame_20180920_00

aappling-usgs commented 6 years ago

Well, I still prefer the rounded corners, but Jordan voted for square on Slack, so I switched back to that to build the movie last night. I'm keeping the rounded-corners option commented out so we can use it if we change our minds.

I think this PR is ready to merge now.

jordansread commented 6 years ago

I think rounded corners would be good considering the circle is the main shape appearing in this viz. But I thought the radius in the examples was a bit large.

aappling-usgs commented 6 years ago

Oh, phew! I thought you must be a die-hard rectangle guy or something. Sure, we can mess with the radius. What looks best might depend on the shapes and fuzziness of the final callout polygons, so will plan to experiment with lots of radii once we get the callout events and polygons closer to finalized.

aappling-usgs commented 6 years ago

kind of complex but cool

@lindsaycarr The complexity mostly comes from the fact that the preceding code is all geared toward the 4 position+size parameters that rect wants (the four corners), whereas grid::grid.roundrect wants the center point, width, and height. I think we could simplify the function to about the same complexity as before if we committed to just one rectangle shape type.