public void CopyDots(byte[] destination, byte[] source, int width, int height, int destX, int destY, int destWidth, int destHeight, int sourceX, int sourceY, int sourceWidth, int sourceHeight, bool enableTransparent)
 {
     if (isX64)
     {
         CalculationX64.copyDots(destination, source, width, height, destX, destY, destWidth, destHeight, sourceX, sourceY, sourceWidth, sourceHeight, enableTransparent);
     }
     else
     {
         CalculationX86.copyDots(destination, source, width, height, destX, destY, destWidth, destHeight, sourceX, sourceY, sourceWidth, sourceHeight, enableTransparent);
     }
 }
 public void WriteStringToDots(byte[] dots, string str, int fontIndex, ulong fontColor, ulong backgroundColor, int x, int y, int dotWidth, int dotHeight)
 {
     if (isX64)
     {
         CalculationX64.writeStringToDots(dots, str, fonts[fontIndex].Hfont, (uint)fonts[fontIndex].AntialiasFormat, fontColor, backgroundColor, x, y, dotWidth, dotHeight);
     }
     else
     {
         CalculationX86.writeStringToDots(dots, str, fonts[fontIndex].Hfont, (uint)fonts[fontIndex].AntialiasFormat, fontColor, backgroundColor, x, y, dotWidth, dotHeight);
     }
 }
 public void WriteImageToDots(byte[] dots, byte[] source, int x, int y, int width, int height, int drawWidth, int drawHeight, int dotWidth, int dotHeight, int xIndex, int yIndex, bool enableTransparent)
 {
     if (isX64)
     {
         CalculationX64.writeImageToDots(dots, source, x, y, width, height, drawWidth, drawHeight, dotWidth, dotHeight, xIndex, yIndex, enableTransparent);
     }
     else
     {
         CalculationX86.writeImageToDots(dots, source, x, y, width, height, drawWidth, drawHeight, dotWidth, dotHeight, xIndex, yIndex, enableTransparent);
     }
 }
 public void Draw(byte[] bmp, byte[] dots, int dotWidth, int dotHeight, double dotXDistance, double dotYDistance, double dotRadius, int stride, bool redrawAll)
 {
     if (isX64)
     {
         CalculationX64.draw(bmp, dots, dotWidth, dotHeight, dotXDistance, dotYDistance, dotRadius, stride, redrawAll);
     }
     else
     {
         CalculationX86.draw(bmp, dots, dotWidth, dotHeight, dotXDistance, dotYDistance, dotRadius, stride, redrawAll);
     }
 }
 public void ClearDots(byte[] dots, int dotWidth, int dotHeight)
 {
     if (isX64)
     {
         CalculationX64.clearDots(dots, dotWidth, dotHeight);
     }
     else
     {
         CalculationX86.clearDots(dots, dotWidth, dotHeight);
     }
 }
        public int RegisterFont(string fontFamily, int fontSize, int fontWeight, AntialiasFormat antialiasFormat)
        {
            IntPtr hfont = isX64 ? CalculationX64.getHfont(fontFamily, fontSize, fontWeight) : CalculationX86.getHfont(fontFamily, fontSize, fontWeight);

            if (fonts.Any(f => f.FontFamily == fontFamily && f.FontSize == fontSize && f.FontWeight == fontWeight && f.AntialiasFormat == antialiasFormat))
            {
                return(fonts.FindIndex(f => f.FontFamily == fontFamily && f.FontSize == fontSize && f.FontWeight == fontWeight && f.AntialiasFormat == antialiasFormat));
            }
            else
            {
                fonts.Add(new FontInfo(hfont, fontFamily, fontSize, fontWeight, antialiasFormat));
                return(fonts.Count - 1);
            }
        }
 public int GetStringWidth(string str, int fontIndex)
 => isX64?
 CalculationX64.getStringWidth(str, fonts[fontIndex].Hfont, (uint)fonts[fontIndex].AntialiasFormat) :
     CalculationX86.getStringWidth(str, fonts[fontIndex].Hfont, (uint)fonts[fontIndex].AntialiasFormat);
 public int GetStringHeight(int fontIndex)
 => isX64?
 CalculationX64.getStringHeight(fonts[fontIndex].Hfont) :
     CalculationX86.getStringHeight(fonts[fontIndex].Hfont);