UNPKG

create-gojs-kit

Version:

A CLI for downloading GoJS samples, extensions, and docs

181 lines 67.8 kB
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><link rel="stylesheet" href="../../assets/css/style.css"/><link rel="preconnect" href="https://rsms.me/"/><link rel="stylesheet" href="https://rsms.me/inter/inter.css"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Brush | GoJS API</title><meta name="description" content="Documentation for GoJS API"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script type="text/javascript">// formerly in api.js
  var hash = null;
  function changeHash() {
      var panels = document.getElementsByClassName("tsd-panel");
      for (let i = 0; i < panels.length; i++) {
          var p = panels[i];
          p.classList.remove("targeted");
      }
      hash = window.location.hash.slice(1);
      if (hash) {
          var elt = document.getElementById(hash);
          if (elt) elt.parentNode.classList.add("targeted");
      }
  }
  document.addEventListener("DOMContentLoaded", changeHash);
  window.addEventListener("hashchange", changeHash);</script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header><nav id="navTop" class="w-full h-[var(--topnav-h)] z-30 bg-[var(--color-background-secondary)] border-b border-b-[var(--color-accent)]"><div class="max-w-screen-xl mx-auto flex flex-wrap items-start justify-between px-4"><a class="!text-white bg-nwoods-primary font-bold !leading-[calc(var(--topnav-h)_-_1px)] my-0 px-2 text-4xl lg:text-5xl logo" href="../../index.html">GoJS</a><div class="relative"><button id="topnavButton" class="h-[calc(var(--topnav-h)_-_1px)] px-2 m-0 text-[var(--color-text)] bg-inherit shadow-none md:hidden hover:!bg-inherit hover:!text-nwoods-accent hover:!shadow-none" aria-label="Navigation"><svg class="h-7 w-7 block" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div id="topnavList" class="hidden md:block"><div class="absolute right-0 z-30 flex flex-col items-end rounded border border-[var(--color-accent)] p-4 pl-12 shadow bg-[var(--color-background-secondary)] text-[var(--color-text)] font-semibold
                        md:flex-row md:space-x-4 md:items-start md:border-0 md:p-0 md:shadow-none md:!bg-inherit"><a href="../../learn/index.html">Learn</a><a href="../../samples/index.html">Samples</a><a href="../../intro/index.html">Intro</a><a class="active" href="../../api/index.html">API</a><a href="../../download.html">Download</a><a href="https://forum.nwoods.com/c/gojs/11" target="_blank" rel="noopener">Forum</a><a href="https://nwoods.com/contact.html" target="_blank" rel="noopener" id="contactBtn">Contact</a><a href="https://nwoods.com/sales/index.html" target="_blank" rel="noopener" id="buyBtn">Buy</a></div></div></div></div></nav><script>window.addEventListener("DOMContentLoaded", function () {
    // topnav
    var topButton = document.getElementById("topnavButton");
    var topnavList = document.getElementById("topnavList");
    if (topButton && topnavList) {
      topButton.addEventListener("click", function (e) {
        topnavList
          .classList
          .toggle("hidden");
        e.stopPropagation();
      });
      document.addEventListener("click", function (e) {
        // if the clicked element isn't the list, close the list
        if (!topnavList.classList.contains("hidden") && !e.target.closest("#topnavList")) {
          topButton.click();
        }
      });

      // set active <a> element
      // done via active tag below, always API
    }
  });</script><div class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><div id="tsd-search-help"><code class="!text-lg">/</code> to search</div><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">GoJS API</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><div class="flex w-full max-w-screen-xl mx-auto px-2 items-center justify-between"><div><ul class="tsd-breadcrumb"><li><a href="../index.html">GoJS API</a></li><li><a href="Brush.html">Brush</a></li></ul><h1 class="flex items-center">Class Brush</h1></div><div class="text-xs"><b>GoJS</b>® Diagramming Components<br/>version 3.1.0<br/>by <a href="https://nwoods.com/">Northwoods Software®</a></div></div></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>A Brush holds color information and describes how to draw the inside
of a <a href="Shape.html" class="tsd-kind-class">Shape</a> or the stroke of a shape or a <a href="TextBlock.html" class="tsd-kind-class">TextBlock</a> or the
background of any <a href="GraphObject.html" class="tsd-kind-class">GraphObject</a>.</p>
<p>A Brush must not be modified once it has been assigned to a <a href="GraphObject.html" class="tsd-kind-class">GraphObject</a>,
such as the <a href="Shape.html#fill" class="tsd-kind-accessor">Shape.fill</a> or <a href="TextBlock.html#stroke" class="tsd-kind-accessor">TextBlock.stroke</a>
or <a href="GraphObject.html#background" class="tsd-kind-accessor">GraphObject.background</a>.
However, a Brush may be shared by multiple GraphObjects.</p>
</div></section><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="true" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="Brush.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Accessors</h3><div class="tsd-index-list"><a href="Brush.html#color" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>color</span></a>
<a href="Brush.html#colorStops" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>color<wbr/>Stops</span></a>
<a href="Brush.html#end" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>end</span></a>
<a href="Brush.html#endRadius" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>end<wbr/>Radius</span></a>
<a href="Brush.html#pattern-1" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>pattern</span></a>
<a href="Brush.html#start" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>start</span></a>
<a href="Brush.html#startRadius" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>start<wbr/>Radius</span></a>
<a href="Brush.html#type" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>type</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="Brush.html#addColorStop" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Color<wbr/>Stop</span></a>
<a href="Brush.html#copy" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy</span></a>
<a href="Brush.html#darkenBy" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>darken<wbr/>By</span></a>
<a href="Brush.html#isDark" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Dark</span></a>
<a href="Brush.html#lightenBy" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>lighten<wbr/>By</span></a>
<a href="Brush.html#darken" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><g id="subicon-S,#FF4DB8"><rect fill="var(--color-icon-background)" width="28" height="28" rx="14"></rect><path transform="translate(2, 2)" fill="none" stroke-width="1.5" stroke="var(--color-text)" d="M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5" stroke-linecap="round" stroke-linejoin="round"></path></g></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>darken</span></a>
<a href="Brush.html#darkenBy-2" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>darken<wbr/>By</span></a>
<a href="Brush.html#isDark-2" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Dark</span></a>
<a href="Brush.html#isValidColor" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Valid<wbr/>Color</span></a>
<a href="Brush.html#lighten" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>lighten</span></a>
<a href="Brush.html#lightenBy-2" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>lighten<wbr/>By</span></a>
<a href="Brush.html#mix" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>mix</span></a>
<a href="Brush.html#randomColor" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>random<wbr/>Color</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="Brush.html#HSL" class="tsd-index-link deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><g id="subicon-S,#FF984D"><rect fill="var(--color-icon-background)" width="28" height="28" rx="14"></rect><path transform="translate(2, 2)" fill="none" stroke-width="1.5" stroke="var(--color-text)" d="M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5" stroke-linecap="round" stroke-linejoin="round"></path></g></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><g id="subicon-R,#FF984D"><rect fill="var(--color-icon-background)" width="28" height="28" rx="14"></rect><path transform="translate(2, 2)" fill="none" stroke-width="1.5" stroke="var(--color-text)" d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z" stroke-linecap="round" stroke-linejoin="round"></path></g></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>HSL</span></a>
<a href="Brush.html#Lab" class="tsd-index-link deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Lab</span></a>
<a href="Brush.html#Linear" class="tsd-index-link deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Linear</span></a>
<a href="Brush.html#Pattern" class="tsd-index-link deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Pattern</span></a>
<a href="Brush.html#Radial" class="tsd-index-link deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Radial</span></a>
<a href="Brush.html#Solid" class="tsd-index-link deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Solid</span></a>
</div></section></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Constructors</h2><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_Brush" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Brush</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">type</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><a href="BrushType.html" class="tsd-signature-type tsd-kind-enum">BrushType</a>, <span class="tsd-kind-parameter">init</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="Brush.html" class="tsd-signature-type tsd-kind-class">Brush</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> &amp; </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Brush.html" class="tsd-signature-type tsd-kind-class">Brush</a><a href="#constructor.new_Brush" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Construct a Brush class that holds the given color information.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">type</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><a href="BrushType.html" class="tsd-signature-type tsd-kind-enum">BrushType</a></h5><div class="tsd-comment tsd-typography"><p>Optional, one of the values <a href="BrushType.html#Solid" class="tsd-kind-enum-member">BrushType.Solid</a>, <a href="BrushType.html#Linear" class="tsd-kind-enum-member">BrushType.Linear</a>, <a href="BrushType.html#Radial" class="tsd-kind-enum-member">BrushType.Radial</a>, <a href="BrushType.html#Pattern" class="tsd-kind-enum-member">BrushType.Pattern</a>,
or a well-formed CSS string describing a solid color brush.
No argument defaults to a <a href="BrushType.html#Solid" class="tsd-kind-enum-member">BrushType.Solid</a> with a color description of &#39;black&#39;.</p>
</div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">init</span>: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="Brush.html" class="tsd-signature-type tsd-kind-class">Brush</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> &amp; </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h5><div class="tsd-comment tsd-typography"><p>Optional initialization properties.
In addition to Brush properties, this object can also contain color stops in the format:
<code>{ 0: &quot;#FEC901&quot;, 0.2: &quot;#FFFFAA&quot;, 1: &quot;#FEA200&quot; }</code>
Such numeric property names result in calls to <a href="Brush.html#addColorStop" class="tsd-kind-method">Brush.addColorStop</a>.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="Brush.html" class="tsd-signature-type tsd-kind-class">Brush</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Accessors</h2><section class="tsd-panel tsd-member"><a id="color" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>color</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></div><a href="#color" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the color of a solid Brush.
The default value is &#39;black&#39;.
The value must be a valid CSS color string.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="colorStops" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>color<wbr/>Stops</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Map.html" class="tsd-signature-type tsd-kind-class">Map</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></div><a href="#colorStops" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets a Map holding all of the color stops used in this gradient,
where the key is a number, the fractional distance between 0 and 1 (inclusive),
and where the corresponding value is a color string.</p>
<p>Call <a href="Brush.html#addColorStop" class="tsd-kind-method">addColorStop</a> in order to add color stops to this brush.
This property value may be null if no gradient stops have been defined.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="end" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>end</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type tsd-kind-class">Spot</a></div><a href="#end" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the ending location for a linear or radial gradient.
A <a href="Spot.html" class="tsd-kind-class">Spot</a> value specifies a relative point in the object&#39;s <a href="GraphObject.html#naturalBounds" class="tsd-kind-accessor">GraphObject.naturalBounds</a>.
The default value is <a href="Spot.html#BottomCenter" class="tsd-kind-property">Spot.BottomCenter</a> for linear gradients and <a href="Spot.html#Center" class="tsd-kind-property">Spot.Center</a> for radial gradients.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="endRadius" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>end<wbr/>Radius</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#endRadius" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the radius of a radial brush at the end location.
The default value is NaN.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="pattern-1" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>pattern</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLCanvasElement</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLImageElement</span></div><a href="#pattern-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the pattern of a brush of type <a href="BrushType.html#Pattern" class="tsd-kind-enum-member">BrushType.Pattern</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="start" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>start</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type tsd-kind-class">Spot</a></div><a href="#start" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the starting location for a linear or radial gradient.
A <a href="Spot.html" class="tsd-kind-class">Spot</a> value specifies a relative point in the object&#39;s <a href="GraphObject.html#naturalBounds" class="tsd-kind-accessor">GraphObject.naturalBounds</a>.
The default value is <a href="Spot.html#TopCenter" class="tsd-kind-property">Spot.TopCenter</a> for linear gradients and <a href="Spot.html#Center" class="tsd-kind-property">Spot.Center</a> for radial gradients.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="startRadius" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>start<wbr/>Radius</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#startRadius" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the radius of a radial brush at the start location.
The default value is 0.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="type" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>type</span><div class="membertype"><span class="tsd-signature-symbol">: </span><a href="BrushType.html" class="tsd-signature-type tsd-kind-enum">BrushType</a></div><a href="#type" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the type of brush.
The default value is <a href="BrushType.html#Solid" class="tsd-kind-enum-member">BrushType.Solid</a>.
The value must be a <a href="BrushType.html" class="tsd-kind-enum">BrushType</a>.
If the new value is a linear or radial brush type,
and if the <a href="Brush.html#start" class="tsd-kind-accessor">start</a> or <a href="Brush.html#end" class="tsd-kind-accessor">end</a> spots are not specific spots,
they are changed to be specific spots, depending on the type of brush.</p>
</div></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Methods</h2><section class="tsd-panel tsd-member"><a id="addColorStop" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>add<wbr/>Color<wbr/>Stop</span><a href="#addColorStop" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="addColorStop.addColorStop-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Color<wbr/>Stop</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">loc</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">color</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addColorStop.addColorStop-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Specify a particular color at a particular fraction of the distance.
If the <a href="Brush.html#type" class="tsd-kind-accessor">type</a> is <a href="BrushType.html#Solid" class="tsd-kind-enum-member">BrushType.Solid</a>, change the type to <a href="BrushType.html#Linear" class="tsd-kind-enum-member">BrushType.Linear</a>.
You should not have duplicate color stop values at the same fractional distance.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">loc</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>A number between 0 and 1 (inclusive).</p>
</div></li><li><h5><span class="tsd-kind-parameter">color</span>: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>A valid CSS color string.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>this Brush</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="copy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>copy</span><a href="#copy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="copy.copy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">copy</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Brush.html" class="tsd-signature-type tsd-kind-class">Brush</a><a href="#copy.copy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Create a copy of this Brush with the same values.</p>
</div><h4 class="tsd-returns-title">Returns <a href="Brush.html" class="tsd-signature-type tsd-kind-class">Brush</a></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="darkenBy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>darken<wbr/>By</span><a href="#darkenBy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="darkenBy.darkenBy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">darken<wbr/>By</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fraction</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">mode</span><span class="tsd-signature-symbol">?: </span><a href="ColorSpace.html" class="tsd-signature-type tsd-kind-enum">ColorSpace</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#darkenBy.darkenBy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modifies all colors within this Brush, darkening them by some fraction.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">fraction</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>Fraction to darken the colors by. Defaults to 0.2, must be between 0 and 1 (inclusive).</p>
</div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">mode</span>: <a href="ColorSpace.html" class="tsd-signature-type tsd-kind-enum">ColorSpace</a></h5><div class="tsd-comment tsd-typography"><p>Color space to use for adjusting. Must be a <a href="ColorSpace.html" class="tsd-kind-enum">ColorSpace</a> value, defaults to <a href="ColorSpace.html#Oklch" class="tsd-kind-enum-member">ColorSpace.Oklch</a>.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>This Brush with modified color values.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="isDark" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>is<wbr/>Dark</span><a href="#isDark" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="isDark.isDark-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Dark</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isDark.isDark-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This function determines whether this Brush is &quot;dark.&quot;</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>2.0</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="lightenBy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>lighten<wbr/>By</span><a href="#lightenBy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="lightenBy.lightenBy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">lighten<wbr/>By</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fraction</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">mode</span><span class="tsd-signature-symbol">?: </span><a href="ColorSpace.html" class="tsd-signature-type tsd-kind-enum">ColorSpace</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#lightenBy.lightenBy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modifies all colors within this Brush, lightening them by some fraction.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">fraction</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>Fraction to lighten the colors by. Defaults to 0.2, must be between 0 and 1 (inclusive).</p>
</div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">mode</span>: <a href="ColorSpace.html" class="tsd-signature-type tsd-kind-enum">ColorSpace</a></h5><div class="tsd-comment tsd-typography"><p>Color space to use for adjusting. Must be a <a href="ColorSpace.html" class="tsd-kind-enum">ColorSpace</a> value, defaults to <a href="ColorSpace.html#Oklch" class="tsd-kind-enum-member">ColorSpace.Oklch</a>.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>This Brush with modified color values.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="darken" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>darken</span><a href="#darken" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="darken.darken-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">darken</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">color</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#darken.darken-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function takes a color and darkens it by 20% in the Lab color space.
This is a convenience function which calls <a href="Brush.html#darkenBy-2" class="tsd-kind-method">Brush.darkenBy</a>.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">color</span>: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>A valid CSS color string.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>A CSS string for the darkened color in RGBA.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="darkenBy-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>darken<wbr/>By</span><a href="#darkenBy-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="darkenBy-2.darkenBy-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">darken<wbr/>By</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">color</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, <span class="tsd-kind-parameter">fraction</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">mode</span><span class="tsd-signature-symbol">?: </span><a href="ColorSpace.html" class="tsd-signature-type tsd-kind-enum">ColorSpace</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#darkenBy-2.darkenBy-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function takes a color and darkens it.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">color</span>: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>A valid CSS color string</p>
</div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">fraction</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>Fraction to darken the color by. Defaults to 0.2, must be between 0 and 1 (inclusive).</p>
</div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">mode</span>: <a href="ColorSpace.html" class="tsd-signature-type tsd-kind-enum">ColorSpace</a></h5><div class="tsd-comment tsd-typography"><p>Color space to use for adjusting. Must be a <a href="ColorSpace.html" class="tsd-kind-enum">ColorSpace</a> value, defaults to <a href="ColorSpace.html#Oklch" class="tsd-kind-enum-member">ColorSpace.Oklch</a>.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>A CSS string for the darkened color in RGBA or HSLA.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="isDark-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>is<wbr/>Dark</span><a href="#isDark-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="isDark-2.isDark-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Dark</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">color</span><span class="tsd-signature-symbol">: </span><a href="BrushLike.html" class="tsd-signature-type tsd-kind-type-alias">BrushLike</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isDark-2.isDark-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function takes a color and determines whether it is &quot;dark.&quot; Does not account for transparency.</p>
<p>Example usage:</p>
<pre><code class="language-js"><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">nodeTemplate</span><span class="hl-2"> =</span><br/><span class="hl-2"> </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Node</span><span class="hl-2">(</span><span class="hl-6">&#39;Auto&#39;</span><span class="hl-2">)</span><br/><span class="hl-2">   .</span><span class="hl-5">add</span><span class="hl-2">(</span><br/><span class="hl-2">     </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Shape</span><span class="hl-2">(</span><span class="hl-6">&#39;RoundedRectangle&#39;</span><span class="hl-2">, { </span><span class="hl-4">strokeWidth:</span><span class="hl-2"> </span><span class="hl-7">0</span><span class="hl-2"> })</span><br/><span class="hl-2">       .</span><span class="hl-5">bind</span><span class="hl-2">(</span><span class="hl-6">&#39;fill&#39;</span><span class="hl-2">, </span><span class="hl-6">&#39;color&#39;</span><span class="hl-2">),</span><br/><span class="hl-2">     </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">TextBlock</span><span class="hl-2">({ </span><span class="hl-4">margin:</span><span class="hl-2"> </span><span class="hl-7">8</span><span class="hl-2"> })</span><br/><span class="hl-2">       </span><span class="hl-0">// Dark nodes use white text, light nodes use black text</span><br/><span class="hl-2">       .</span><span class="hl-5">bind</span><span class="hl-2">(</span><span class="hl-6">&#39;stroke&#39;</span><span class="hl-2">, </span><span class="hl-6">&#39;color&#39;</span><span class="hl-2">, </span><span class="hl-4">c</span><span class="hl-2"> </span><span class="hl-1">=&gt;</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Brush</span><span class="hl-2">.</span><span class="hl-5">isDark</span><span class="hl-2">(</span><span class="hl-4">c</span><span class="hl-2">) ? </span><span class="hl-6">&#39;white&#39;</span><span class="hl-2"> : </span><span class="hl-6">&#39;black&#39;</span><span class="hl-2">)</span><br/><span class="hl-2">       .</span><span class="hl-5">bind</span><span class="hl-2">(</span><span class="hl-6">&#39;text&#39;</span><span class="hl-2">, </span><span class="hl-6">&#39;key&#39;</span><span class="hl-2">)</span><br/><span class="hl-2">   );</span>
</code><button>Copy</button></pre>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">color</span>: <a href="BrushLike.html" class="tsd-signature-type tsd-kind-type-alias">BrushLike</a></h5><div class="tsd-comment tsd-typography"><p>A valid CSS color string or a Brush.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>2.0</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="isValidColor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>is<wbr/>Valid<wbr/>Color</span><a href="#isValidColor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="isValidColor.isValidColor-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Valid<wbr/>Color</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">color</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isValidColor.isValidColor-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function returns true if a given color string is well-formed for drawing.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">color</span>: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>A color string to validate.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="lighten" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>lighten</span><a href="#lighten" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="lighten.lighten-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">lighten</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">color</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#lighten.lighten-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function takes a color and lightens it by 20% in the Lab color space.
This is a convenience function which calls <a href="Brush.html#lightenBy-2" class="tsd-kind-method">Brush.lightenBy</a>.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">color</span>: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>A valid CSS color string.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>A CSS string for the lightened color in RGBA.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="lightenBy-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>lighten<wbr/>By</span><a href="#lightenBy-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="lightenBy-2.lightenBy-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">lighten<wbr/>By</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">color</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, <span class="tsd-kind-parameter">fraction</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">mode</span><span class="tsd-signature-symbol">?: </span><a href="ColorSpace.html" class="tsd-signature-type tsd-kind-enum">ColorSpace</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#lightenBy-2.lightenBy-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function takes a color and lightens it.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">color</span>: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>A valid CSS color string.</p>
</div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">fraction</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>Fraction to lighten the colors by. Defaults to 0.2, must be between 0 and 1 (inclusive).</p>
</div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">mode</span>: <a href="ColorSpace.html" class="tsd-signature-type tsd-kind-enum">ColorSpace</a></h5><div class="tsd-comment tsd-typography"><p>Color space to use for adjusting. Must be a <a href="ColorSpace.html" class="tsd-kind-enum">ColorSpace</a> value, defaults to <a href="ColorSpace.html#Oklch" class="tsd-kind-enum-member">ColorSpace.Oklch</a>.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>A CSS string for the lightened color in RGBA or HSLA.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="mix" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>mix</span><a href="#mix" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="mix.mix-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">mix</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">color1</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, <span class="tsd-kind-parameter">color2</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, <span class="tsd-kind-parameter">fraction</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#mix.mix-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function takes two colors and mixes them together, using the (optionally) specified amount of the second color.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">color1</span>: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>A valid CSS color string.</p>
</div></li><li><h5><span class="tsd-kind-parameter">color2</span>: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Another valid CSS color string to mix.</p>
</div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">fraction</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>Fraction specifying how much color2 to mix into color1. Defaults to .5, must be between 0 and 1 (inclusive).</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>2.0</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="randomColor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>random<wbr/>Color</span><a href="#randomColor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="randomColor.randomColor-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">random<wbr/>Color</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">min</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">max</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#randomColor.randomColor-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function can be used to generate a random color.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">min</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>A number between 0 and 255, defaults to 128.</p>
</div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">max</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>A number between 0 and 255, defaults to 255.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>A color value in # hexadecimal format.</p>
</li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Properties</h2><section class="tsd-panel tsd-member"><a id="HSL" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span class="deprecated">HSL</span><a href="#HSL" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">deprecated</code><p>See <a href="ColorSpace.html#HSL" class="tsd-kind-enum-member">ColorSpace.HSL</a>.</p>
</div></div></section><section class="tsd-panel tsd-member"><a id="Lab" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span class="deprecated">Lab</span><a href="#Lab" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">deprecated</code><p>See <a href="ColorSpace.html#Lab" class="tsd-kind-enum-member">ColorSpace.Lab</a>.</p>
</div></div></section><section class="tsd-panel tsd-member"><a id="Linear" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span class="deprecated">Linear</span><a href="#Linear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">deprecated</code><p>See <a href="BrushType.html#Linear" class="tsd-kind-enum-member">BrushType.Linear</a>.</p>
</div></div></section><section class="tsd-panel tsd-member"><a id="Pattern" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span class="deprecated">Pattern</span><a href="#Pattern" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">deprecated</code><p>See <a href="BrushType.html#Pattern" class="tsd-kind-enum-member">BrushType.Pattern</a>.</p>
</div></div></section><section class="tsd-panel tsd-member"><a id="Radial" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span class="deprecated">Radial</span><a href="#Radial" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">deprecated</code><p>See <a href="BrushType.html#Radial" class="tsd-kind-enum-member">BrushType.Radial</a>.</p>
</div></div></section><section class="tsd-panel tsd-member"><a id="Solid" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span class="deprecated">Solid</span><a href="#Solid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">deprecated</code><p>See <a href="BrushType.html#Solid" class="tsd-kind-enum-member">BrushType.Solid</a>.</p>
</div></div></section></section></div><div class="col-sidebar"><div class="page-menu"><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><ul><li><a href="#constructor"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></li><li><a href="#color"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>color</span></a></li><li><a href="#colorStops"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>color<wbr/>Stops</span></a></li><li><a href="#end"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>end</span></a></li><li><a href="#endRadius"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>end<wbr/>Radius</span></a></li><li><a href="#pattern-1"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>pattern</span></a></li><li><a href="#start"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>start</span></a></li><li><a href="#startRadius"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>start<wbr/>Radius</span></a></li><li><a href="#type"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>type</span></a></li><li><a href="#addColorStop"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Color<wbr/>Stop</span></a></li><li><a href="#copy"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy</span></a></li><li><a href="#darkenBy"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>darken<wbr/>By</span></a></li><li><a href="#isDark"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Dark</span></a></li><li><a href="#lightenBy"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>lighten<wbr/>By</span></a></li><li><a href="#darken"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>darken</span></a></li><li><a href="#darkenBy-2"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>darken<wbr/>By</span></a></li><li><a href="#isDark-2"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Dark</span></a></li><li><a href="#isValidColor"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Valid<wbr/>Color</span></a></li><li><a href="#lighten"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>lighten</span></a></li><li><a href="#lightenBy-2"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>lighten<wbr/>By</span></a></li><li><a href="#mix"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>mix</span></a></li><li><a href="#randomColor"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>random<wbr/>Color</span></a></li><li><a href="#HSL" class="deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>HSL</span></a></li><li><a href="#Lab" class="deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Lab</span></a></li><li><a href="#Linear" class="deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Linear</span></a></li><li><a href="#Pattern" class="deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Pattern</span></a></li><li><a href="#Radial" class="deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Radial</span></a></li><li><a href="#Solid" class="deprecated"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF984D"></use></svg><svg class="readonly tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-R,#FF984D"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>Solid</span></a></li></ul></div></details><div class="tsd-navigation settings"><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">System</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>GoJS API</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><div class="tsd w-full max-w-screen-xl mx-auto px-2"><div class="bottom-copyright">Copyright © 1998-2025 by Northwoods Software Corporation.</div></div><div class="overlay"></div><script async src="https://www.googletagmanager.com/gtag/js?id=G-S5QK8VSK84"></script><script>window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-S5QK8VSK84');
var getOutboundLink = function(url, label) {
  gtag('event', 'click', {
  'event_category': 'outbound',
  'event_label': label,
  'transport_type': 'beacon'
  });
}

document.getElementById("contactBtn").addEventListener("click", function() {
  getOutboundLink('https://nwoods.com/contact.html', 'contact');
});
document.getElementById("buyBtn").addEventListener("click", function() {
  getOutboundLink('https://nwoods.com/sales/index.html', 'buy');
});</script></body></html>