introduces the Range interface (instead of a concrete type).
This commit is contained in:
parent
8af50213c3
commit
b0934ee2e3
27 changed files with 331 additions and 172 deletions
|
|
@ -40,7 +40,7 @@ func (as AnnotationSeries) Measure(r Renderer, canvasBox Box, xrange, yrange Ran
|
|||
Bottom: 0,
|
||||
}
|
||||
if as.Style.IsZero() || as.Style.Show {
|
||||
style := as.Style.WithDefaultsFrom(Style{
|
||||
style := as.Style.InheritFrom(Style{
|
||||
Font: defaults.Font,
|
||||
FillColor: DefaultAnnotationFillColor,
|
||||
FontSize: DefaultAnnotationFontSize,
|
||||
|
|
@ -64,7 +64,7 @@ func (as AnnotationSeries) Measure(r Renderer, canvasBox Box, xrange, yrange Ran
|
|||
// Render draws the series.
|
||||
func (as AnnotationSeries) Render(r Renderer, canvasBox Box, xrange, yrange Range, defaults Style) {
|
||||
if as.Style.IsZero() || as.Style.Show {
|
||||
style := as.Style.WithDefaultsFrom(Style{
|
||||
style := as.Style.InheritFrom(Style{
|
||||
Font: defaults.Font,
|
||||
FontColor: DefaultTextColor,
|
||||
FillColor: DefaultAnnotationFillColor,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue