Section Pictures
Staff picture and graphic lines utility functions
- See
- Picture
Summary
| Return type | Function and summary |
|---|---|
| int | ApplyToAllGraphicLines(Score score, staves, int firstBar, int lastBar, function processFunc) Apply a function to all graphic lines (Picture objectss) in the score, or staff, or in a range of bars. |
| int | ApplyToAllImages(Score score, staves, int firstBar, int lastBar, function processFunc) Apply a function to all images (Picture objectss) in the score, or staff, or in a range of bars. |
| int | ApplyToAllSelectedGraphicLines(Score score, function processFunc, boolean printedStavesOnly) Apply a function to all selected graphic lines (Picture objects), individually selected or inside range selection. |
| int | ApplyToAllSelectedImages(Score score, function processFunc, boolean printedStavesOnly) Apply a function to all selected images (Picture objects), individually selected or inside range selection. |
| boolean | EnsureObjectInStaffArea(Score score, Staff staff, obj) Ensure an object is in the Staff area, move it vertically if needed. |
Functions
EnsureObjectInStaffArea(Score score, Staff staff, obj)
Ensure an object is in the Staff area, move it vertically if needed.
| Parameter | Type | Default | Description |
|---|---|---|---|
| score | Score | score | |
| staff | Staff | staff | |
| obj | Object: Dynamic, StaffText, FXProcessor, Picture |
- Return
- boolean:
trueif object has been moved vertically,falseotherwise.
ApplyToAllSelectedGraphicLines(Score score, function processFunc, boolean printedStavesOnly)
Apply a function to all selected graphic lines (Picture objects), individually selected or inside range selection.
This browses selected graphic lines on visible (printed) staves from first to last.
| Parameter | Type | Default | Description |
|---|---|---|---|
| score | Score | score | |
| processFunc | function | Function with two Picture and Staff arguments, which returns true (= 1) if graphic line has been processed, -1 to stop the process. Other returned values are ignored, process continue to next. | |
| printedStavesOnly | boolean | false | If true selected lines on not printed staves are skipped. This has no effect in Scroll mode where all staves are visible. |
- Return
- int: Number of processed graphic lines
- Error
- if arguments are not valid.
ApplyToAllGraphicLines(Score score, staves, int firstBar, int lastBar, function processFunc)
Apply a function to all graphic lines (Picture objectss) in the score, or staff, or in a range of bars.
| Parameter | Type | Default | Description |
|---|---|---|---|
| score | Score | score | |
| staves | nil | ||
| firstBar | int | 1 | First bar to start applying the function. |
| lastBar | int | score.NumberOfBars | Last bar to stop applying the function. |
| processFunc | function | Function with two Picture and Staff arguments, which returns true (= 1) if graphic line has been processed, -1 to stop the process. Other returned values are ignored, process continue to next graphic line. |
- Return
- int: Number of processed graphic lines
- Error
- if arguments are not valid.
- See
- ApplyToAllSelectedGraphicLines
ApplyToAllSelectedImages(Score score, function processFunc, boolean printedStavesOnly)
Apply a function to all selected images (Picture objects), individually selected or inside range selection.
This browses selected images on visible (printed) staves from first to last.
| Parameter | Type | Default | Description |
|---|---|---|---|
| score | Score | score | |
| processFunc | function | Function with two Picture and Staff arguments, which returns true (= 1) if image has been processed, -1 to stop the process. Other returned values are ignored, process continue to next. | |
| printedStavesOnly | boolean | false | If true selected images on not printed staves are skipped. This has no effect in Scroll mode where all staves are visible. |
- Return
- int: Number of processed images
- Error
- if arguments are not valid.
ApplyToAllImages(Score score, staves, int firstBar, int lastBar, function processFunc)
Apply a function to all images (Picture objectss) in the score, or staff, or in a range of bars.
| Parameter | Type | Default | Description |
|---|---|---|---|
| score | Score | score | |
| staves | nil | ||
| firstBar | int | 1 | First bar to start applying the function. |
| lastBar | int | score.NumberOfBars | Last bar to stop applying the function. |
| processFunc | function | Function with two Picture and Staff arguments, which returns true (= 1) if image has been processed, -1 to stop the process. Other returned values are ignored, process continue to next image. |
- Return
- int: Number of processed images
- Error
- if arguments are not valid.
- See
- ApplyToAllSelectedImages