Creates a graphic with the specified mark and size.

@param mark the mark
@param size the size
@return the graphic
169741
public static GraphicInfo createGraphic(MarkInfo mark, int size) {
		GraphicInfo graphicInfo = new GraphicInfo();
		ChoiceInfo choice = new ChoiceInfo();
		choice.setMark(mark);
		graphicInfo.getChoiceList().add(choice);
		SizeInfo sizeInfo = new SizeInfo();
		sizeInfo.setValue(Integer.toString(size));
		graphicInfo.setSize(sizeInfo);
		return graphicInfo;
	}
269032
public void setCustomTickLabelFontSize(final double SIZE) {
        if (null == customTickLabelFontSize) {
            _customTickLabelFontSize = Helper.clamp(0.0, 72.0, SIZE);
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            customTickLabelFontSize.set(SIZE);
        }
    }
1306165
public static String fill(char c, int size) {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < size; i++) {
            builder.append(c);
        }
        return builder.toString();
    }
28687
@NonNull
    public IconicsDrawable sizeDpX(@Dimension(unit = DP) int sizeDp) {
        return sizePxX(Utils.convertDpToPx(mContext, sizeDp));
    }
1234503
protected Paint getCheckMarkPaint() {
        Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
        paint.setColor(DEFAULT_CHECK_STROKE_COLOR);
        paint.setStyle(Paint.Style.STROKE);
        paint.setStrokeWidth(getCheckMarkStrokeWidthInPixels());
        return paint;
    }
1192214
@Override
    public AbstractGauge init(final int WIDTH, final int HEIGHT) {
        if (WIDTH <= 1 || HEIGHT <= 1) {
            return this;
        }

        if (!isFrameVisible()) {
            setFramelessOffset(-getInnerBounds().width * 0.0841121495, -getInnerBounds().width * 0.0841121495);
        } else {
            setFramelessOffset(getInnerBounds().x, getInnerBounds().y);
        }

        // Create Background Image
        if (bImage != null) {
            bImage.flush();
        }
        bImage = UTIL.createImage(WIDTH, WIDTH, Transparency.TRANSLUCENT);

        // Create Foreground Image
        if (fImage != null) {
            fImage.flush();
        }
        fImage = UTIL.createImage(WIDTH, WIDTH, Transparency.TRANSLUCENT);

        if (isFrameVisible()) {
            switch (getFrameType()) {
                case SQUARE:
                    FRAME_FACTORY.createLinearFrame(WIDTH, WIDTH, getFrameDesign(), getCustomFrameDesign(), getFrameEffect(), bImage);
                    break;
                case ROUND:

                default:
                    FRAME_FACTORY.createRadialFrame(WIDTH, getFrameDesign(), getCustomFrameDesign(), getFrameEffect(), bImage);
                    break;
            }
        }

        if (isBackgroundVisible()) {
            switch (getFrameType()) {
                case SQUARE:
                    BACKGROUND_FACTORY.createLinearBackground(WIDTH, WIDTH, getBackgroundColor(), getCustomBackground(), getModel().getTextureColor(), bImage);
                    break;
                case ROUND:

                default:
                    BACKGROUND_FACTORY.createRadialBackground(WIDTH, getBackgroundColor(), getCustomBackground(), getModel().getTextureColor(), bImage);
                    break;
            }
        }

        create_TICKMARKS_Image(WIDTH, 60f, 0.075, 0.14, bImage);

        if (smallTickmarkImage != null) {
            smallTickmarkImage.flush();
        }
        smallTickmarkImage = create_TICKMARKS_Image((int) (0.285 * WIDTH), 30f, 0.095, 0.17, null);

        if (mainPointerImage != null) {
            mainPointerImage.flush();
        }
        mainPointerImage = create_MAIN_POINTER_Image(WIDTH);

        if (mainPointerShadowImage != null) {
            mainPointerShadowImage.flush();
        }
        mainPointerShadowImage = create_MAIN_POINTER_SHADOW_Image(WIDTH);

        if (smallPointerImage != null) {
            smallPointerImage.flush();
        }
        smallPointerImage = create_SMALL_POINTER_Image(WIDTH);

        if (smallPointerShadowImage != null) {
            smallPointerShadowImage.flush();
        }
        smallPointerShadowImage = create_SMALL_POINTER_SHADOW_Image(WIDTH);

        if (isForegroundVisible()) {
            switch (getFrameType()) {
                case SQUARE:
                    FOREGROUND_FACTORY.createLinearForeground(WIDTH, WIDTH, false, bImage);
                    break;

                case ROUND:

                default:
                    FOREGROUND_FACTORY.createRadialForeground(WIDTH, false, getForegroundType(), fImage);
                    break;
            }
        }

        if (disabledImage != null) {
            disabledImage.flush();
        }
        disabledImage = DISABLED_FACTORY.createRadialDisabled(WIDTH);

        return this;
    }
236309
public static ImageIcon getScaledImageIcon(String fileName, int targetWidth, int targetHeight) {
		return MSwingUtilities.getScaledInstance(getImageIcon(fileName), targetWidth, targetHeight);
	}
583246
public static Image scale(Image srcImg, int width, int height) {
		return Img.from(srcImg).scale(width, height).getImg();
	}
815545
protected IntBuffer createIntBuffer(int size) {
      ByteBuffer temp = ByteBuffer.allocateDirect(4 * size);
      temp.order(ByteOrder.nativeOrder());

      return temp.asIntBuffer();
    }
311250
@NonNull
    public IconicsDrawable sizeRes(@DimenRes int sizeResId) {
        return sizePx(mContext.getResources().getDimensionPixelSize(sizeResId));
    }
1099681
public Cell<C,T> size (Value<C,T> size) {
		minWidth = size;
		minHeight = size;
		prefWidth = size;
		prefHeight = size;
		maxWidth = size;
		maxHeight = size;
		return this;
	}
1035073
public <R extends Request<T>> R addMarker(String tag, Object... args) {
        Marker marker = new Marker(tag,
                Thread.currentThread().getId(),
                Thread.currentThread().getName(),
                System.nanoTime());

        synchronized (markerListeners) {
            for (RequestListener.MarkerListener markerListener : markerListeners) {
                markerListener.onMarker(marker, args);
            }
        }

        if (logSlowRequests && requestBirthTime == 0) {
            requestBirthTime = System.nanoTime();
        }

        return (R) this;
    }
126947
public function getMapSizeMarker($size)
    {
        $b = '';

        if ($size < Constants::SIZE_TINY) {
            $b .= chr(Constants::MAP_TINY + $size);

            return $b;
        }

        if ($size < Constants::SIZE_8) {
            $b .= chr(Constants::MAP_8);
            $b .= $this->packUnsignedShortShort($size);

            return $b;
        }

        if ($size < Constants::SIZE_16) {
            $b .= chr(Constants::MAP_16);
            $b .= $this->packUnsignedShort($size);

            return $b;
        }

        if ($size < Constants::SIZE_32) {
            $b .= chr(Constants::MAP_32);
            $b .= $this->packUnsignedLong($size);

            return $b;
        }

        throw new SerializationException(sprintf('Unable to pack Array with size %d. Out of bound !', $size));
    }
406551
public void setSize( String size, boolean isProperty ) {
        this.size = size;
        if (isProperty) {
            graphic.setSize(ff.property(size));
        } else {
            graphic.setSize(ff.literal(size));
        }
    }
183424
public Cell<C,T> minSize (float size) {
		minWidth = new FixedValue<C, T>(layout.toolkit, size);
		minHeight = new FixedValue<C, T>(layout.toolkit, size);
		return this;
	}
295277
private BufferedImage create_HI_INDICATOR_Image(final int WIDTH) {
        if (WIDTH <= 0) {
            return null;
        }

        // Define the size of the indicator
        int indicatorSize = (int) (0.015 * WIDTH);
        if (indicatorSize < 4) {
            indicatorSize = 4;
        }
        if (indicatorSize > 8) {
            indicatorSize = 8;
        }

        final BufferedImage IMAGE = UTIL.createImage(indicatorSize, indicatorSize, Transparency.TRANSLUCENT);
        final Graphics2D G2 = IMAGE.createGraphics();
        G2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        G2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
        G2.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
        G2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
        G2.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
        G2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
        G2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);

        final int IMAGE_WIDTH = IMAGE.getWidth();
        final int IMAGE_HEIGHT = IMAGE.getHeight();

        final GeneralPath THRESHOLD_TRIANGLE = new GeneralPath();
        THRESHOLD_TRIANGLE.setWindingRule(Path2D.WIND_EVEN_ODD);
        THRESHOLD_TRIANGLE.moveTo(IMAGE_WIDTH * 0.5, 0);
        THRESHOLD_TRIANGLE.lineTo(0, IMAGE_HEIGHT);
        THRESHOLD_TRIANGLE.lineTo(IMAGE_WIDTH, IMAGE_HEIGHT);
        THRESHOLD_TRIANGLE.lineTo(IMAGE_WIDTH * 0.5, 0);
        THRESHOLD_TRIANGLE.closePath();
        final Point2D THRESHOLD_TRIANGLE_START = new Point2D.Double(0, THRESHOLD_TRIANGLE.getBounds2D().getMinY());
        final Point2D THRESHOLD_TRIANGLE_STOP = new Point2D.Double(0, THRESHOLD_TRIANGLE.getBounds2D().getMaxY());
        final float[] THRESHOLD_TRIANGLE_FRACTIONS = {
            0.0f,
            0.3f,
            0.59f,
            1.0f
        };
        final Color[] THRESHOLD_TRIANGLE_COLORS = {
            new Color(82, 0, 0, 255),
            new Color(252, 29, 0, 255),
            new Color(252, 29, 0, 255),
            new Color(82, 0, 0, 255)
        };
        final LinearGradientPaint THRESHOLD_TRIANGLE_GRADIENT = new LinearGradientPaint(THRESHOLD_TRIANGLE_START, THRESHOLD_TRIANGLE_STOP, THRESHOLD_TRIANGLE_FRACTIONS, THRESHOLD_TRIANGLE_COLORS);
        G2.setPaint(THRESHOLD_TRIANGLE_GRADIENT);
        G2.fill(THRESHOLD_TRIANGLE);
        G2.setColor(Color.RED);
        G2.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
        G2.draw(THRESHOLD_TRIANGLE);

        G2.dispose();

        return IMAGE;
    }
244426
protected final BufferedImage create_LED_Image(final int SIZE, final int STATE, final LedColor LED_COLOR) {
        return LED_FACTORY.create_LED_Image(SIZE, STATE, LED_COLOR, model.getCustomLedColor());
    }