「VexFlow test content」の版間の差分

提供:yonewiki
(ページの作成:「<div id="yonet202403Mid_Output01"></div> <yjavascript></script> <script> (function(){ var VF = Vex.Flow; (function(){ let nscale = 0.68 let nwidth = 1040; let nheight = 420; let nHeadMargin = 70; let nStaveWidth = 350; const f = new Factory({ renderer: { elementId: 'yonet202403Mid_Output01', width: nwidth, height: nheight * nscale } }); const ctx = f.getContext(); ctx.scale(nscale, nscale); const defaultStyle = { lineWidth: ctx.lineWidth, strokeStyle: ct…」)
 
編集の要約なし
12行目: 12行目:
let nStaveWidth = 350;
let nStaveWidth = 350;


const f = new Factory({  
const f = new VF.Factory({  
   renderer: { elementId: 'yonet202403Mid_Output01', width: nwidth, height: nheight * nscale }
   renderer: { elementId: 'yonet202403Mid_Output01', width: nwidth, height: nheight * nscale }
   });
   });
56行目: 56行目:
ctx.strokeStyle = defaultStyle.strokeStyle;
ctx.strokeStyle = defaultStyle.strokeStyle;


const stave1 = new Stave(10, 50, nHeadMargin + nStaveWidth).setContext(ctx);
const stave1 = new VF.Stave(10, 50, nHeadMargin + nStaveWidth).setContext(ctx);
stave1.setClef("treble").setContext(ctx);
stave1.setClef("treble").setContext(ctx);
stave1.setTimeSignature('4/4').setContext(ctx);
stave1.setTimeSignature('4/4').setContext(ctx);

2024年3月28日 (木) 21:41時点における版