getImage(pixelRatio) {
    const fillKey = this.fill_?.getKey();
    const cacheKey =
      `${pixelRatio},${this.angle_},${this.radius},${this.radius2_},${this.points_},${fillKey}` +
      Object.values(this.renderOptions_).join(',');
    let image = /** @type {HTMLCanvasElement} */ (
      iconImageCache.get(cacheKey, null, null)?.getImage(1)
    );
    if (!image) {
      const renderOptions = this.renderOptions_;
      const size = Math.ceil(renderOptions.size * pixelRatio);
      const context = createCanvasContext2D(size, size);
      this.draw_(renderOptions, context, pixelRatio);

      image = context.canvas;
      iconImageCache.set(
        cacheKey,
        null,
        null,
        new IconImage(image, undefined, null, ImageState.LOADED, null),
      );
    }
    return image;
  }
Get the image icon.
@param {number} pixelRatio Pixel ratio.
@return {HTMLCanvasElement} Image or Canvas element.
@api
@override