| 
    Beatmup
    
   | 
 
AbstractTask drawing amplitude graph of a given Signal in a bitmap. More...
#include <signal_plot.h>
  
Public Member Functions | |
| SignalPlot () | |
| void | setSignal (Signal *) | 
| Sets the input signal to plot.  More... | |
| void | setBitmap (AbstractBitmap *) | 
| Sets the output bitmap.  More... | |
| void | setPlotArea (IntRectangle) | 
| Specifies a rectangular area in pixels in the output bitmap where the plot will be drawn.  More... | |
| void | setWindow (IntRectangle window, float scale) | 
Specifies a time range (X coordinate) and a magnitude range (Y coordinate scaled by scale) that will be plotted.  More... | |
| void | setPalette (color4i bgColor, color4i color1, color4i color2) | 
| Specifies plot colors.  More... | |
| void | setChannels (int channels) | 
| Specifies which channels to plot.  More... | |
| AbstractBitmap * | getBitmap () const | 
| Signal * | getSignal () const | 
  Public Member Functions inherited from Beatmup::AbstractTask | |
| virtual bool | processOnGPU (GraphicPipeline &gpu, TaskThread &thread) | 
| Executes the task on GPU.  More... | |
  Public Member Functions inherited from Beatmup::Object | |
| virtual | ~Object () | 
Protected Member Functions | |
| virtual bool | process (TaskThread &thread) | 
| Executes the task on CPU within a given thread.  More... | |
| virtual void | beforeProcessing (ThreadIndex, ProcessingTarget target, GraphicPipeline *) | 
| Instruction called before the task is executed.  More... | |
| virtual void | afterProcessing (ThreadIndex, GraphicPipeline *, bool) | 
| Instruction called after the task is executed.  More... | |
| virtual TaskDeviceRequirement | getUsedDevices () const | 
| Communicates devices (CPU and/or GPU) the task is run on.  More... | |
| virtual ThreadIndex | getMaxThreads () const | 
| Gives the upper limint on the number of threads the task may be performed by.  More... | |
Private Member Functions | |
| void | getPlot (TaskThread &thread, std::vector< int > &data, int &left, int &right) | 
  Private Member Functions inherited from Beatmup::BitmapContentLock | |
| BitmapContentLock () | |
| ~BitmapContentLock () | |
| void | readLock (GraphicPipeline *gpu, AbstractBitmap *bitmap, ProcessingTarget target) | 
| Locks content of a bitmap for reading using a specific processing target device.  More... | |
| void | writeLock (GraphicPipeline *gpu, AbstractBitmap *bitmap, ProcessingTarget target) | 
| Locks content of a bitmap for writing using a specific processing target device.  More... | |
| void | unlock (AbstractBitmap *bitmap) | 
| Drops a lock to the bitmap.  More... | |
| void | unlockAll () | 
| Unlocks all the locked bitmaps unconditionally.  More... | |
| template<const ProcessingTarget target> | |
| void | lock (GraphicPipeline *gpu, AbstractBitmap *input, AbstractBitmap *output) | 
| void | lock (GraphicPipeline *gpu, ProcessingTarget target, AbstractBitmap *input, AbstractBitmap *output) | 
| template<const ProcessingTarget target> | |
| void | lock (GraphicPipeline *gpu, std::initializer_list< AbstractBitmap * > read, std::initializer_list< AbstractBitmap * > write) | 
| template<typename ... Args> | |
| void | unlock (AbstractBitmap *first, Args ... others) | 
Private Attributes | |
| Signal * | signal | 
| AbstractBitmap * | bitmap | 
| IntRectangle | outputRect | 
| IntRectangle | signalWindow | 
| float | scale | 
| int | channels | 
| std::vector< int > | values | 
| struct { | |
| color4i bgColor | |
| color4i color1 | |
| color4i color2 | |
| } | palette | 
Additional Inherited Members | |
  Public Types inherited from Beatmup::AbstractTask | |
| enum class | TaskDeviceRequirement { CPU_ONLY , GPU_OR_CPU , GPU_ONLY } | 
| Specifies which device (CPU and/or GPU) is used to run the task.  More... | |
  Static Public Member Functions inherited from Beatmup::AbstractTask | |
| static ThreadIndex | validThreadCount (int number) | 
| Valid thread count from a given integer value.  More... | |
AbstractTask drawing amplitude graph of a given Signal in a bitmap.
Definition at line 31 of file signal_plot.h.
| SignalPlot::SignalPlot | ( | ) | 
Definition at line 191 of file signal_plot.cpp.
      
  | 
  private | 
Definition at line 130 of file signal_plot.cpp.
      
  | 
  protectedvirtual | 
Executes the task on CPU within a given thread.
Generally called by multiple threads.
| thread | associated task execution context | 
true if the execution is finished correctly, false otherwise Implements Beatmup::AbstractTask.
Definition at line 201 of file signal_plot.cpp.
      
  | 
  protectedvirtual | 
Instruction called before the task is executed.
| threadCount | Number of threads used to perform the task | 
| target | Device used to perform the task | 
| gpu | A graphic pipeline instance; may be null. | 
Reimplemented from Beatmup::AbstractTask.
Definition at line 226 of file signal_plot.cpp.
      
  | 
  protectedvirtual | 
Instruction called after the task is executed.
| threadCount | Number of threads used to perform the task | 
| gpu | GPU to be used to execute the task; may be null. | 
| aborted | true if the task was aborted  | 
Reimplemented from Beatmup::AbstractTask.
Definition at line 235 of file signal_plot.cpp.
      
  | 
  protectedvirtual | 
Communicates devices (CPU and/or GPU) the task is run on.
Reimplemented from Beatmup::AbstractTask.
Definition at line 240 of file signal_plot.cpp.
      
  | 
  protectedvirtual | 
Gives the upper limint on the number of threads the task may be performed by.
The actual number of threads running a specific task may be less or equal to the returned value, depending on the number of workers in ThreadPool running the task.
Reimplemented from Beatmup::AbstractTask.
Definition at line 245 of file signal_plot.cpp.
| void SignalPlot::setSignal | ( | Signal * | signal | ) | 
Sets the input signal to plot.
Definition at line 251 of file signal_plot.cpp.
| void SignalPlot::setBitmap | ( | AbstractBitmap * | bitmap | ) | 
Sets the output bitmap.
Definition at line 256 of file signal_plot.cpp.
| void SignalPlot::setPlotArea | ( | IntRectangle | rectangle | ) | 
Specifies a rectangular area in pixels in the output bitmap where the plot will be drawn.
Definition at line 261 of file signal_plot.cpp.
| void SignalPlot::setWindow | ( | IntRectangle | window, | 
| float | scale | ||
| ) | 
Specifies a time range (X coordinate) and a magnitude range (Y coordinate scaled by scale) that will be plotted. 
| window | a rectangle in time-value plane containing the two ranges | 
| scale | magnitude scaling factor | 
Definition at line 266 of file signal_plot.cpp.
Specifies plot colors.
| bgColor | background color | 
| color1 | main plotting color | 
| color2 | second plotting color used when plotting all the channels together (see setChannels()) | 
Definition at line 272 of file signal_plot.cpp.
| void SignalPlot::setChannels | ( | int | channels | ) | 
Specifies which channels to plot.
| channels | a channel number (counted from 0) to plot a single channel; any number out of correct range to plot all channels | 
Definition at line 279 of file signal_plot.cpp.
      
  | 
  inline | 
Definition at line 98 of file signal_plot.h.
      
  | 
  inline | 
Definition at line 99 of file signal_plot.h.
      
  | 
  private | 
Definition at line 33 of file signal_plot.h.
      
  | 
  private | 
Definition at line 34 of file signal_plot.h.
      
  | 
  private | 
Definition at line 35 of file signal_plot.h.
      
  | 
  private | 
Definition at line 36 of file signal_plot.h.
      
  | 
  private | 
Definition at line 37 of file signal_plot.h.
      
  | 
  private | 
Definition at line 38 of file signal_plot.h.
      
  | 
  private | 
Definition at line 40 of file signal_plot.h.
| color4i Beatmup::Audio::SignalPlot::bgColor | 
Definition at line 43 of file signal_plot.h.
| color4i Beatmup::Audio::SignalPlot::color1 | 
Definition at line 43 of file signal_plot.h.
| color4i Beatmup::Audio::SignalPlot::color2 | 
Definition at line 43 of file signal_plot.h.
| struct { ... } Beatmup::Audio::SignalPlot::palette |