ソースを参照

docstrings & comment for pageBackgroundColor hiding cursor

sschmidPS 5 年 前
コミット
7c272ccae0

+ 1 - 0
src/MusicalScore/Graphical/VexFlow/CanvasVexFlowBackend.ts

@@ -63,6 +63,7 @@ export class CanvasVexFlowBackend extends VexFlowBackend {
         // set background color if not transparent
         if (EngravingRules.Rules.PageBackgroundColor !== undefined) {
             this.ctx.save();
+            // note that this will hide the cursor
             this.ctx.setFillStyle(EngravingRules.Rules.PageBackgroundColor);
             this.ctx.fillRect(0, 0, (this.canvas as any).width, (this.canvas as any).height);
             this.ctx.restore();

+ 1 - 0
src/MusicalScore/Graphical/VexFlow/SvgVexFlowBackend.ts

@@ -54,6 +54,7 @@ export class SvgVexFlowBackend extends VexFlowBackend {
         // set background color if not transparent
         if (EngravingRules.Rules.PageBackgroundColor !== undefined) {
             this.ctx.save();
+            // note that this will hide the cursor
             this.ctx.setFillStyle(EngravingRules.Rules.PageBackgroundColor);
 
             this.ctx.fillRect(0, 0, this.canvas.offsetWidth, this.canvas.offsetHeight);

+ 1 - 0
src/OpenSheetMusicDisplay/OSMDOptions.ts

@@ -118,6 +118,7 @@ export interface IOSMDOptions {
      *  Example: "#FFFFFF" = white. "#12345600" = transparent.
      *  This can be useful when you want to export an image with e.g. white background color instead of transparent,
      *  from a CanvasBackend.
+     *  Note: Using a background color will prevent the cursor from being visible.
      */
     pageBackgroundColor?: string;
 }