drawFlag() {
    const {
      beam, glyph, context, stem, stem_direction,
      render_options: { draw_stem, glyph_font_scale },
    } = this;

    const shouldDrawFlag = beam == null && draw_stem;

    // Now it's the flag's turn.
    if (glyph.flag && shouldDrawFlag) {
      const flag_x = this.getStemX() + 1;
      const flag_y = this.getStemY() - stem.getHeight();

      const flag_code = stem_direction === Stem.DOWN
        ? glyph.code_flag_downstem // Down stems have flags on the left.
        : glyph.code_flag_upstem;

      // Draw the Flag
      Glyph.renderGlyph(context, flag_x, flag_y, glyph_font_scale, flag_code);
    }
  }
// Draw the fal onto the context
Draw the fal onto the context
Draw the fal onto the context
drawFlag() {
    const {
      beam, glyph, context, stem, stem_direction,
      render_options: { draw_stem, glyph_font_scale },
    } = this;
    const shouldDrawFlag = beam == null && draw_stem;
    if (glyph.flag && shouldDrawFlag) {
      const flag_x = this.getStemX() + 1;
      const flag_y = this.getStemY() - stem.getHeight();
      const flag_code = stem_direction === Stem.DOWN
        ? glyph.code_flag_downstem 
        : glyph.code_flag_upstem;
      Glyph.renderGlyph(context, flag_x, flag_y, glyph_font_scale, flag_code);
    }
  }
drawFlag ( ) { const { beam , glyph , context , stem , stem_direction , render_options : { draw_stem , glyph_font_scale } , } = this ; const shouldDrawFlag = beam == null && draw_stem ; if ( glyph . flag && shouldDrawFlag ) { const flag_x = this . getStemX ( ) + 1 ; const flag_y = this . getStemY ( ) - stem . getHeight ( ) ; const flag_code = stem_direction === Stem . DOWN ? glyph . code_flag_downstem : glyph . code_flag_upstem ; Glyph . renderGlyph ( context , flag_x , flag_y , glyph_font_scale , flag_code ) ; } }
Draw the fal onto the context
Draw the fal onto the context
// Now it's the flag's turn. // Down stems have flags on the left. // Draw the Flag