public override void Draw(Graphics g, Point drawLocation) { PointF drawPoint = new PointF( noteRect.X - Position.Lane * ScoreInfo.UnitLaneWidth - drawLocation.X + ScoreLane.scoreWidth, Location.Y - drawLocation.Y); g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; using (Font myFont = new Font("MS UI Gothic", ScoreInfo.FontSize, FontStyle.Bold)) { g.DrawString( "x" + NoteValue.ToString(), myFont, Brushes.Red, new PointF( drawPoint.X + adjustPoint.X, drawPoint.Y + adjustPoint.Y)); } using (Pen myPen = new Pen(Color.Red, 1)) { g.DrawLine( myPen, drawPoint.X - ScoreLane.scoreWidth, drawPoint.Y, drawPoint.X, drawPoint.Y); } #if DEBUG /* * using (Pen myPen = new Pen(Color.White)) * { * RectangleF hitRect = new RectangleF( * noteRect.X - Position.Lane * ScoreInfo.MinLaneWidth + ScoreLane.scoreWidth + adjustPoint.X, * Location.Y + adjustPoint.Y, * 20, * 9); * e.Graphics.DrawRectangles(myPen, new RectangleF[] { hitRect }); * } * //*/ #endif }
public override HTML_NoteDiv ToHTML() { HTML_NoteDiv divNote = new HTML_NoteDiv(CSS_MusicalNote.ClassName, NoteID, NoteValue.ToString()); return(divNote); }
public Note(NoteValue note) { this.Value = note; this.StringValue = note.ToString(); }