/frameworks/base/core/java/com/android/internal/util/ |
H A D | ImageUtils.java | 32 // Amount (max is 255) that two channels can differ before the color is no longer "gray". 52 * COMPACT_BITMAP_SIZE^2 pixels using filtering. The hope is that any non-gray color elements 53 * will survive the squeezing process, contaminating the result with color. 101 * Classifies a color as grayscale or not. Grayscale here means "very close to a perfect 106 public static boolean isGrayscale(int color) { argument 107 int alpha = 0xFF & (color >> 24); 112 int r = 0xFF & (color >> 16); 113 int g = 0xFF & (color >> 8); 114 int b = 0xFF & color;
|
H A D | NotificationColorUtil.java | 74 * @return True if the bitmap is grayscale; false if it is color or too large to examine. 112 * @return True if the bitmap is grayscale; false if it is color or too large to examine. 137 * @return True if the bitmap is grayscale; false if it is color or too large to examine. 157 * @return The color inverted text. 185 // Allocate a new array so we don't change the colors in the old color state 204 private int processColor(int color) { argument 205 return Color.argb(Color.alpha(color), 206 255 - Color.red(color), 207 255 - Color.green(color), 208 255 - Color.blue(color)); [all...] |
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/ |
H A D | SpeechOrbView.java | 32 mNotListeningOrbColors = new Colors(resources.getColor(R.color.lb_speech_orb_not_recording), 33 resources.getColor(R.color.lb_speech_orb_not_recording_pulsed), 34 resources.getColor(R.color.lb_speech_orb_not_recording_icon)); 35 mListeningOrbColors = new Colors(resources.getColor(R.color.lb_speech_orb_recording), 36 resources.getColor(R.color.lb_speech_orb_recording),
|
/frameworks/base/core/java/android/widget/ |
H A D | CalendarView.java | 139 * Sets the background color for the selected week. 141 * @param color The week background color. 145 public void setSelectedWeekBackgroundColor(int color) { argument 146 mDelegate.setSelectedWeekBackgroundColor(color); 150 * Gets the background color for the selected week. 152 * @return The week background color. 161 * Sets the color for the dates of the focused month. 163 * @param color The focused month date color 167 setFocusedMonthDateColor(int color) argument 189 setUnfocusedMonthDateColor(int color) argument 211 setWeekNumberColor(int color) argument 233 setWeekSeparatorLineColor(int color) argument 523 setSelectedWeekBackgroundColor(int color) argument 526 setFocusedMonthDateColor(int color) argument 529 setUnfocusedMonthDateColor(int color) argument 532 setWeekNumberColor(int color) argument 535 setWeekSeparatorLineColor(int color) argument [all...] |
H A D | CalendarViewMaterialDelegate.java | 94 public void setSelectedWeekBackgroundColor(int color) { argument 104 public void setFocusedMonthDateColor(int color) { argument 114 public void setUnfocusedMonthDateColor(int color) { argument 144 public void setWeekNumberColor(int color) { argument 155 public void setWeekSeparatorLineColor(int color) { argument
|
H A D | TextViewWithCircularIndicator.java | 79 public void setCircleColor(int color) { argument 80 if (color != mCircleColor) { 81 mCircleColor = color;
|
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ |
H A D | ResourceHelper.java | 65 * Returns the color value represented by the given string value 66 * @param value the color value 67 * @return the color as an int 88 char[] color = new char[8]; 89 color[0] = color[1] = 'F'; 90 color[2] = color[3] = value.charAt(0); 91 color[4] = color[ [all...] |
/frameworks/opt/datetimepicker/src/com/android/datetimepicker/time/ |
H A D | CircleView.java | 51 mCircleColor = res.getColor(R.color.white); 52 mDotColor = res.getColor(R.color.numbers_text_color); 82 mCircleColor = res.getColor(R.color.dark_gray); 83 mDotColor = res.getColor(R.color.light_gray); 85 mCircleColor = res.getColor(R.color.white); 86 mDotColor = res.getColor(R.color.numbers_text_color);
|
H A D | AmPmCirclesView.java | 77 mUnselectedColor = res.getColor(R.color.white); 78 mSelectedColor = res.getColor(R.color.blue); 79 mAmPmTextColor = res.getColor(R.color.ampm_text_color); 104 mUnselectedColor = res.getColor(R.color.dark_gray); 105 mSelectedColor = res.getColor(R.color.red); 106 mAmPmTextColor = res.getColor(R.color.white); 109 mUnselectedColor = res.getColor(R.color.white); 110 mSelectedColor = res.getColor(R.color.blue); 111 mAmPmTextColor = res.getColor(R.color.ampm_text_color);
|
/frameworks/opt/colorpicker/src/com/android/colorpicker/ |
H A D | ColorPickerDialog.java | 32 * select a specific color swatch, which invokes a listener. 124 public void onColorSelected(int color) { argument 126 mListener.onColorSelected(color); 132 listener.onColorSelected(color); 135 if (color != mSelectedColor) { 136 mSelectedColor = color; 137 // Redraw palette to show checkmark on newly selected color before dismissing. 174 public void setSelectedColor(int color) { argument 175 if (mSelectedColor != color) { 176 mSelectedColor = color; [all...] |
H A D | ColorPickerPalette.java | 31 * A color picker custom view which creates an grid of color squares. The number of squares per 96 for (int color : colors) { 99 View colorSwatch = createColorSwatch(color, selectedColor); 100 setSwatchDescription(rowNumber, tableElements, rowElements, color == selectedColor, 174 * Creates a color swatch. 176 private ColorPickerSwatch createColorSwatch(int color, int selectedColor) { argument 177 ColorPickerSwatch view = new ColorPickerSwatch(getContext(), color, 178 color == selectedColor, mOnColorSelectedListener);
|
/frameworks/rs/driver/ |
H A D | rsdFrameBufferObj.h | 30 void setColorTarget(DrvAllocation *color, uint32_t index) { argument 31 mColorTargets[index] = color;
|
H A D | rsdFrameBuffer.cpp | 49 // Now attach color targets 51 DrvAllocation *color = NULL; local 53 color = (DrvAllocation *)fb->mHal.state.colorTargets[i]->mHal.drv; 55 if (color->uploadDeferred) { 60 fbo->setColorTarget(color, i);
|
/frameworks/base/core/java/android/content/res/ |
H A D | ColorStateList.java | 44 * "color" subdirectory directory of an application's resource directory. The XML file contains 49 * <item android:state_focused="true" android:color="@color/testcolor1"/> 50 * <item android:state_pressed="true" android:state_enabled="false" android:color="@color/testcolor2" /> 51 * <item android:state_enabled="false" android:color="@color/testcolor3" /> 52 * <item android:color="@color/testcolor5"/> 56 * This defines a set of state spec / color pair 99 valueOf(int color) argument 350 addFirstIfMissing( ColorStateList colorStateList, int state, int color) argument [all...] |
/frameworks/native/opengl/libagl/ |
H A D | vertex.cpp | 36 c->current.color.r = 0x10000; 37 c->current.color.g = 0x10000; 38 c->current.color.b = 0x10000; 39 c->current.color.a = 0x10000; 190 c->current.color.r = gglFloatToFixed(r); 191 c->currentColorClamped.r = gglClampx(c->current.color.r); 192 c->current.color.g = gglFloatToFixed(g); 193 c->currentColorClamped.g = gglClampx(c->current.color.g); 194 c->current.color.b = gglFloatToFixed(b); 195 c->currentColorClamped.b = gglClampx(c->current.color [all...] |
/frameworks/support/v17/leanback/api21/android/support/v17/leanback/widget/ |
H A D | RoundedRectHelperApi21.java | 39 public static void setRoundedRectBackground(View view, int color) { argument 40 if (color == Color.TRANSPARENT) { 45 ((GradientDrawable) view.getBackground().mutate()).setColor(color);
|
/frameworks/base/libs/hwui/ |
H A D | Vertex.h | 77 * Simple structure to describe a vertex with a position, texture UV and ARGB color. 83 float u, float v, int color) { 86 const float a = ((color >> 24) & 0xff) / 255.0f; 87 vertex[0].r = a * ((color >> 16) & 0xff) / 255.0f; 88 vertex[0].g = a * ((color >> 8) & 0xff) / 255.0f; 89 vertex[0].b = a * ((color ) & 0xff) / 255.0f; 82 set(ColorTextureVertex* vertex, float x, float y, float u, float v, int color) argument
|
/frameworks/native/opengl/tests/hwc/ |
H A D | hwcTestLib.cpp | 303 // Parse fractional color of form [0.##, 0.##, 0.##] 309 ColorFract color; local 319 if (!in || ((chStart != '<') && (chStart != '['))) { return color; } 323 if (!in) { return color; } 324 if ((c1 < 0.0) || (c1 > 1.0)) { return color; } 326 if (!in || (ch != ',')) { return color; } 330 if (!in) { return color; } 331 if ((c2 < 0.0) || (c2 > 1.0)) { return color; } 333 if (!in || (ch != ',')) { return color; } 337 if (!in) { return color; } 547 hwcTestColor2Pixel(uint32_t format, ColorFract color, float alpha) argument 655 hwcTestFillColor(GraphicBuffer *gBuf, ColorFract color, float alpha) argument 795 hwcTestColorConvert(uint32_t fromFormat, uint32_t toFormat, ColorFract& color) argument [all...] |
/frameworks/base/services/core/java/com/android/server/wm/ |
H A D | FocusedStackFrame.java | 65 private void draw(Rect bounds, int color) { argument 67 " color=" + Integer.toHexString(color)); 85 c.drawColor(color); 89 c.drawColor(color); 93 c.drawColor(color); 97 c.drawColor(color);
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/ |
H A D | GraphExporter.java | 117 String color = filter.getSignature().getOutputPortInfo(portName).isRequired() 121 " [shape=point,label=\"\",color=" + color + "];\n" + 124 "dummy" + dummyNodeCounter + " [color=" + color + "];\n"); 135 String color = filter.getSignature().getInputPortInfo(portName).isRequired() 139 " [shape=point,label=\"\",color=" + color + "];\n" + 142 getDotName(portName) + "_IN [color=" + color [all...] |
/frameworks/support/v17/leanback/src/android/support/v17/leanback/graphics/ |
H A D | ColorOverlayDimmer.java | 25 * Helper class for assigning a dim color to Paint. It holds the alpha value for 45 context.getResources().getColor(R.color.lb_view_dim_mask_color)); 55 * Creates a ColorOverlayDimmer for the given color and levels. 57 * @param dimColor The color for fully dimmed. Only the RGB values are 124 * Change the RGB of the color according to current dim level. Maintains the 125 * alpha value of the color. 127 * @param color The color to apply the dim level to. 128 * @return A color with the RGB values adjusted by the alpha of the current 131 public int applyToColor(int color) { argument [all...] |
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/ |
H A D | DataUsageGraph.java | 47 mTrackColor = res.getColor(R.color.data_usage_graph_track); 48 mUsageColor = res.getColor(R.color.system_accent_color); 49 mOverlimitColor = res.getColor(R.color.system_warning_color); 50 mWarningColor = res.getColor(R.color.data_usage_graph_warning);
|
/frameworks/support/v7/appcompat/src/android/support/v7/internal/widget/ |
H A D | TintManager.java | 186 final int color = getThemeAttrColor(colorAttr); 188 // First, lets see if the cache already contains the color filter 189 PorterDuffColorFilter filter = COLOR_FILTER_CACHE.get(color, tintMode); 192 // Cache miss, so create a color filter and add it to the cache 193 filter = new PorterDuffColorFilter(color, tintMode); 194 COLOR_FILTER_CACHE.put(color, tintMode, filter); 197 // Finally set the color filter 206 " with color: #" + Integer.toHexString(color)); 231 * Generate the default color stat 390 get(int color, PorterDuff.Mode mode) argument 394 put(int color, PorterDuff.Mode mode, PorterDuffColorFilter filter) argument 398 generateCacheKey(int color, PorterDuff.Mode mode) argument [all...] |
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/jni/ |
H A D | colorspace.cpp | 29 uint32 color; member in union:Rgba 47 Rgba color; local 48 color.channel[kRed] = clamp(y + static_cast<int>(1.402 * v)); 49 color.channel[kGreen] = clamp(y - static_cast<int>(0.344 * u + 0.714 * v)); 50 color.channel[kBlue] = clamp(y + static_cast<int>(1.772 * u)); 51 color.channel[kAlpha] = 0xFF; 52 return color;
|
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
H A D | BitmapMutateActivity.java | 93 int color = 0xff000000; 95 color |= (int) ((0xff * ((i + mOffset) % mSlice) / (float) mSlice)) << 98 mPixels[y * width + x] = color;
|