コード例 #1
0
 public LedMatrixRenderer(
     int width,
     int height,
     int brightness,
     int ledMultiplexing,
     int ledScanmode,
     int ledPwmLsbNanoSeconds,
     int ledPwmBits,
     int ledPwmDither,
     string ledPixelMapper,
     bool drawBorder = true
     )
 {
     _borderWidth = drawBorder ? 1 : 0;
     _matrix      = new RGBLedMatrix.RGBLedMatrix(new RGBLedMatrixOptions
     {
         Rows              = height,
         Cols              = width,
         Brightness        = brightness,
         PwmLsbNanoseconds = ledPwmLsbNanoSeconds,
         Multiplexing      = ledMultiplexing,
         ScanMode          = ledScanmode,
         PwmBits           = ledPwmBits,
         PwmDitherBits     = ledPwmDither,
         PixelMapperConfig = ledPixelMapper
     });
     _canvas = _matrix.CreateOffscreenCanvas();
 }
コード例 #2
0
ファイル: DebugRenderer.cs プロジェクト: tincann/tetris
 public DebugRenderer(int rows, int cols, int brightness)
 {
     _matrix = new RGBLedMatrix.RGBLedMatrix(new RGBLedMatrixOptions {
         PwmLsbNanoseconds = 200, Rows = rows, Cols = cols, Brightness = brightness,
     });
     _canvas = _matrix.CreateOffscreenCanvas();
 }