You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
Paint: treat stroke width 0 as 1 until we implement special handling for it
This commit is contained in:
@@ -75,6 +75,12 @@ JNIEXPORT jint JNICALL Java_android_graphics_Paint_native_1get_1style(JNIEnv *en
|
||||
JNIEXPORT void JNICALL Java_android_graphics_Paint_native_1set_1stroke_1width(JNIEnv *env, jclass clazz, jlong paint_ptr, jfloat width)
|
||||
{
|
||||
struct AndroidPaint *paint = _PTR(paint_ptr);
|
||||
/* TODO: width of 0 means "single pixel width, no matter what",
|
||||
* meanwile width of 1 should care about scaling;
|
||||
* The problem is, 0 is not a valid value for gsk_stroke_set_line_width,
|
||||
* so at least change it to 1 for now */
|
||||
if(width == 0)
|
||||
width = 1;
|
||||
gsk_stroke_set_line_width(paint->gsk_stroke, width);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user