Пример #1
0
 public IPieceDrawer create() {
   if (itsSettings.isUseDefaultImage()) return createCachedNumberDrawer();
   Bitmap storedImage = itsSettings.readImage();
   if (storedImage == null) return createCachedNumberDrawer();
   return new ImagePieceDrawer(createTargetBitmap(storedImage), itsPieceSize);
 }
Пример #2
0
 PieceDrawerFactory(final int width, final int height, final Settings settings) {
   itsWidth = width;
   itsHeight = height;
   itsSettings = settings;
   itsPieceSize = Point.divide(width, height, settings.getFrameSize(width, height));
 }