public static void __hx_ctor_alphatab_rendering_glyphs_BeamGlyph(global::alphatab.rendering.glyphs.BeamGlyph __temp_me129, global::haxe.lang.Null <int> x, global::haxe.lang.Null <int> y, global::alphatab.model.Duration duration, global::alphatab.rendering.utils.BeamDirection direction, bool isGrace) { unchecked { int __temp_y128 = ((global::haxe.lang.Runtime.eq((y).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (y.@value)); int __temp_x127 = ((global::haxe.lang.Runtime.eq((x).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (x.@value)); global::alphatab.rendering.glyphs.SvgGlyph.__hx_ctor_alphatab_rendering_glyphs_SvgGlyph(__temp_me129, new global::haxe.lang.Null <int>(__temp_x127, true), new global::haxe.lang.Null <int>(__temp_y128, true), __temp_me129.getRestSvg(duration, direction, isGrace), ((isGrace) ? (0.7) : (((double)(1)))), __temp_me129.getSvgScale(duration, direction, isGrace)); } }
public virtual void paintFooter(int cx, int cy, global::alphatab.platform.ICanvas canvas, global::alphatab.rendering.utils.BeamingHelper h) { unchecked { global::alphatab.model.Beat beat = ((global::alphatab.model.Beat) (h.beats[0]) ); if (( beat.duration == global::alphatab.model.Duration.Whole )) { return ; } bool isGrace = ( beat.graceType != global::alphatab.model.GraceType.None ); double scaleMod = default(double); if (isGrace) { scaleMod = 0.7; } else { scaleMod = ((double) (1) ); } int stemSize = this.getStemSize(h.maxDuration); int correction = ((int) (( ( 9 * scaleMod ) / 2 )) ); int beatLineX = default(int); { double x = ( h.getBeatLineX(beat) + this.stave.staveGroup.layout.renderer.settings.scale ); beatLineX = ((int) (x) ); } global::alphatab.rendering.utils.BeamDirection direction = h.getDirection(); int topY = this.getScoreY(this.getNoteLine(beat.maxNote()), new global::haxe.lang.Null<int>(correction, true)); int bottomY = this.getScoreY(this.getNoteLine(beat.minNote()), new global::haxe.lang.Null<int>(correction, true)); int beamY = default(int); if (( direction == global::alphatab.rendering.utils.BeamDirection.Down )) { bottomY += ((int) (( stemSize * scaleMod )) ); beamY = bottomY; } else { topY -= ((int) (( stemSize * scaleMod )) ); beamY = topY; } canvas.setColor(this.stave.staveGroup.layout.renderer.renderingResources.mainGlyphColor); canvas.beginPath(); canvas.moveTo(((double) (((int) (( ( cx + this.x ) + beatLineX )) )) ), ((double) (( ( cy + this.y ) + topY )) )); canvas.lineTo(((double) (((int) (( ( cx + this.x ) + beatLineX )) )) ), ((double) (( ( cy + this.y ) + bottomY )) )); canvas.stroke(); if (isGrace) { double graceSizeY = ( 15 * this.stave.staveGroup.layout.renderer.settings.scale ); double graceSizeX = ( 12 * this.stave.staveGroup.layout.renderer.settings.scale ); canvas.beginPath(); if (( direction == global::alphatab.rendering.utils.BeamDirection.Down )) { canvas.moveTo(((double) (((int) (( ( ( cx + this.x ) + beatLineX ) - ( graceSizeX / 2 ) )) )) ), ( ( ( cy + this.y ) + bottomY ) - graceSizeY )); canvas.lineTo(((double) (((int) (( ( ( cx + this.x ) + beatLineX ) + ( graceSizeX / 2 ) )) )) ), ((double) (( ( cy + this.y ) + bottomY )) )); } else { canvas.moveTo(((double) (((int) (( ( ( cx + this.x ) + beatLineX ) - ( graceSizeX / 2 ) )) )) ), ( ( ( cy + this.y ) + topY ) + graceSizeY )); canvas.lineTo(((double) (((int) (( ( ( cx + this.x ) + beatLineX ) + ( graceSizeX / 2 ) )) )) ), ((double) (( ( cy + this.y ) + topY )) )); } canvas.stroke(); } int gx = ((int) (beatLineX) ); global::alphatab.rendering.glyphs.BeamGlyph glyph = new global::alphatab.rendering.glyphs.BeamGlyph(new global::haxe.lang.Null<int>(gx, true), new global::haxe.lang.Null<int>(beamY, true), ((global::alphatab.model.Duration) (beat.duration) ), ((global::alphatab.rendering.utils.BeamDirection) (direction) ), ((bool) (isGrace) )); glyph.renderer = this; glyph.doLayout(); glyph.paint(( cx + this.x ), ( cy + this.y ), canvas); } }