/// <summary> /// Draws note flag /// </summary> /// <param name="beamingService"></param> /// <param name="measurementService"></param> /// <param name="scoreService"></param> /// <param name="renderer"></param> /// <param name="element"></param> /// <param name="beamSpaceDirection"></param> /// <param name="beamNumber"></param> /// <param name="beamOffset"></param> public static void Flag(IBeamingService beamingService, IMeasurementService measurementService, IScoreService scoreService, ScoreRendererBase renderer, Note element, int beamSpaceDirection, int beamNumber, int beamOffset) { //Rysuj chorągiewkę tylko najniższego dźwięku w akordzie //Draw a hook only of the lowest element in a chord double xPos = beamingService.CurrentStemPositionX; if (element.StemDirection == VerticalDirection.Down) { if (element.IsGraceNote || element.IsCueNote) { renderer.DrawCharacter(element.GetNoteFlagCharacter(renderer.Settings.MusicFontProfile.MusicFont, true), MusicFontStyles.GraceNoteFont, new Point(xPos, beamingService.CurrentStemEndPositionY), element); } else { renderer.DrawCharacter(element.GetNoteFlagCharacter(renderer.Settings.MusicFontProfile.MusicFont, true), MusicFontStyles.MusicFont, new Point(xPos, beamingService.CurrentStemEndPositionY), element); } } else { if (element.IsGraceNote || element.IsCueNote) { renderer.DrawCharacter(element.GetNoteFlagCharacter(renderer.Settings.MusicFontProfile.MusicFont, false), MusicFontStyles.GraceNoteFont, new Point(xPos, beamingService.CurrentStemEndPositionY), element); } else { renderer.DrawCharacter(element.GetNoteFlagCharacter(renderer.Settings.MusicFontProfile.MusicFont, false), MusicFontStyles.MusicFont, new Point(xPos, beamingService.CurrentStemEndPositionY), element); } } if (measurementService.TupletState != null) { measurementService.TupletState.AreSingleBeamsPresentUnderTuplet = true; if (element.Tuplet == TupletType.Stop) { TupletMark(measurementService, scoreService, renderer, element); measurementService.TupletState = null; } } }