com.flask.colorpicker.renderer.ColorWheelRenderOption Java Examples
The following examples show how to use
com.flask.colorpicker.renderer.ColorWheelRenderOption.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ColorPickerView.java From java-n-IDE-for-Android with Apache License 2.0 | 6 votes |
private void drawColorWheel() { colorWheelCanvas.drawColor(0, PorterDuff.Mode.CLEAR); if (renderer == null) return; float half = colorWheelCanvas.getWidth() / 2f; float strokeWidth = STROKE_RATIO * (1f + ColorWheelRenderer.GAP_PERCENTAGE); float maxRadius = half - strokeWidth - half / density; float cSize = maxRadius / (density - 1) / 2; ColorWheelRenderOption colorWheelRenderOption = renderer.getRenderOption(); colorWheelRenderOption.density = this.density; colorWheelRenderOption.maxRadius = maxRadius; colorWheelRenderOption.cSize = cSize; colorWheelRenderOption.strokeWidth = strokeWidth; colorWheelRenderOption.alpha = alpha; colorWheelRenderOption.lightness = lightness; colorWheelRenderOption.targetCanvas = colorWheelCanvas; renderer.initWith(colorWheelRenderOption); renderer.draw(); }
Example #2
Source File: ColorPickerView.java From timecat with Apache License 2.0 | 6 votes |
private void drawColorWheel() { colorWheelCanvas.drawColor(0, PorterDuff.Mode.CLEAR); if (renderer == null) return; float half = colorWheelCanvas.getWidth() / 2f; float strokeWidth = STROKE_RATIO * (1f + ColorWheelRenderer.GAP_PERCENTAGE); float maxRadius = half - strokeWidth - half / density; float cSize = maxRadius / (density - 1) / 2; ColorWheelRenderOption colorWheelRenderOption = renderer.getRenderOption(); colorWheelRenderOption.density = this.density; colorWheelRenderOption.maxRadius = maxRadius; colorWheelRenderOption.cSize = cSize; colorWheelRenderOption.strokeWidth = strokeWidth; colorWheelRenderOption.alpha = alpha; colorWheelRenderOption.lightness = lightness; colorWheelRenderOption.targetCanvas = colorWheelCanvas; renderer.initWith(colorWheelRenderOption); renderer.draw(); }
Example #3
Source File: ColorPickerView.java From javaide with GNU General Public License v3.0 | 6 votes |
private void drawColorWheel() { colorWheelCanvas.drawColor(0, PorterDuff.Mode.CLEAR); if (renderer == null) return; float half = colorWheelCanvas.getWidth() / 2f; float strokeWidth = STROKE_RATIO * (1f + ColorWheelRenderer.GAP_PERCENTAGE); float maxRadius = half - strokeWidth - half / density; float cSize = maxRadius / (density - 1) / 2; ColorWheelRenderOption colorWheelRenderOption = renderer.getRenderOption(); colorWheelRenderOption.density = this.density; colorWheelRenderOption.maxRadius = maxRadius; colorWheelRenderOption.cSize = cSize; colorWheelRenderOption.strokeWidth = strokeWidth; colorWheelRenderOption.alpha = alpha; colorWheelRenderOption.lightness = lightness; colorWheelRenderOption.targetCanvas = colorWheelCanvas; renderer.initWith(colorWheelRenderOption); renderer.draw(); }
Example #4
Source File: ColorPickerView.java From openlauncher with Apache License 2.0 | 6 votes |
private void drawColorWheel() { colorWheelCanvas.drawColor(0, PorterDuff.Mode.CLEAR); currentColorCanvas.drawColor(0, PorterDuff.Mode.CLEAR); if (renderer == null) return; float half = colorWheelCanvas.getWidth() / 2f; float strokeWidth = STROKE_RATIO * (1f + ColorWheelRenderer.GAP_PERCENTAGE); float maxRadius = half - strokeWidth - half / density; float cSize = maxRadius / (density - 1) / 2; ColorWheelRenderOption colorWheelRenderOption = renderer.getRenderOption(); colorWheelRenderOption.density = this.density; colorWheelRenderOption.maxRadius = maxRadius; colorWheelRenderOption.cSize = cSize; colorWheelRenderOption.strokeWidth = strokeWidth; colorWheelRenderOption.alpha = alpha; colorWheelRenderOption.lightness = lightness; colorWheelRenderOption.targetCanvas = colorWheelCanvas; renderer.initWith(colorWheelRenderOption); renderer.draw(); }
Example #5
Source File: ColorPickerView.java From droidddle with Apache License 2.0 | 6 votes |
private void drawColorWheel() { colorWheelCanvas.drawColor(0, PorterDuff.Mode.CLEAR); if (renderer == null) return; float half = colorWheelCanvas.getWidth() / 2f; float strokeWidth = STROKE_RATIO * (1f + ColorWheelRenderer.GAP_PERCENTAGE); float maxRadius = half - strokeWidth - half / density; float cSize = maxRadius / (density - 1) / 2; ColorWheelRenderOption colorWheelRenderOption = renderer.getRenderOption(); colorWheelRenderOption.density = this.density; colorWheelRenderOption.maxRadius = maxRadius; colorWheelRenderOption.cSize = cSize; colorWheelRenderOption.strokeWidth = strokeWidth; colorWheelRenderOption.alpha = alpha; colorWheelRenderOption.lightness = lightness; colorWheelRenderOption.targetCanvas = colorWheelCanvas; renderer.initWith(colorWheelRenderOption); renderer.draw(); }