public override bool shouldRepaint(CustomPainter _oldDelegate) { _GlowingOverscrollIndicatorPainter oldDelegate = _oldDelegate as _GlowingOverscrollIndicatorPainter; return(oldDelegate.leadingController != leadingController || oldDelegate.trailingController != trailingController); }
private void Awake() { gameState = GameState.START_UI; uiController = GetComponent <UIController>(); cameraController = FindObjectOfType <CameraController>(); customPainter = FindObjectOfType <CustomPainter>(); customPainter.enabled = false; }
public override bool shouldRepaint(CustomPainter oldDelegate) { if (oldDelegate is LottiePainter oldLottiePainter) { return(_frame != oldLottiePainter._frame); } return(true); }
public override bool shouldRepaint(CustomPainter _oldDelegate) { BannerPainter oldDelegate = _oldDelegate as BannerPainter; return(this.message != oldDelegate.message || this.location != oldDelegate.location || this.color != oldDelegate.color || this.textStyle != oldDelegate.textStyle); }
public override void Draw(NGraphics.ICanvas canvas, NGraphics.Rect rect) { if (BackgroundColor == Xamarin.Forms.Color.Transparent && BorderColor == Xamarin.Forms.Color.Transparent) { return; } CustomPainter.Paint(this, canvas, rect); }
public override bool shouldRepaint(CustomPainter painter) { _DropdownMenuPainter oldPainter = painter as _DropdownMenuPainter; return(oldPainter.color != color || oldPainter.elevation != elevation || oldPainter.selectedIndex != selectedIndex || oldPainter.resize != resize); }
public override bool shouldRepaint(CustomPainter oldPainter) { D.assert(oldPainter is _LinearProgressIndicatorPainter); _LinearProgressIndicatorPainter painter = oldPainter as _LinearProgressIndicatorPainter; return(painter.backgroundColor != this.backgroundColor || painter.valueColor != this.valueColor || painter.value != this.value || painter.animationValue != this.animationValue); }
public override bool shouldRepaint(CustomPainter _oldDelegate) { _AnimatedIconPainter oldDelegate = _oldDelegate as _AnimatedIconPainter; return(oldDelegate.progress.value != progress.value || oldDelegate.color != color || oldDelegate.paths != paths || oldDelegate.scale != scale || oldDelegate.uiPathFactory != uiPathFactory); }
public override bool shouldRepaint(CustomPainter old) { _IndicatorPainter _old = (_IndicatorPainter)old; return(this._needsPaint || this.controller != _old.controller || this.indicator != _old.indicator || this.tabKeys.Count != _old.tabKeys.Count || !_tabOffsetsEqual(this._currentTabOffsets, _old._currentTabOffsets)); }
public override bool shouldRepaint(CustomPainter oldPainter) { D.assert(oldPainter is _CircularProgressIndicatorPainter); _CircularProgressIndicatorPainter painter = oldPainter as _CircularProgressIndicatorPainter; return(painter.valueColor != this.valueColor || painter.value != this.value || painter.headValue != this.headValue || painter.tailValue != this.tailValue || painter.stepValue != this.stepValue || painter.rotationValue != this.rotationValue || painter.strokeWidth != this.strokeWidth); }
public override bool shouldRepaint(CustomPainter oldDelegate) { return(true); NodePortConnectionCustomPainter oldPainter = oldDelegate as NodePortConnectionCustomPainter; if (oldPainter == null) { return(false); } else { return(true); } }
public bool shouldRepaint(CustomPainter oldRaw) { if (oldRaw is ScrollbarPainter old) { return(this.color != old.color || this.textDirection != old.textDirection || this.thickness != old.thickness || this.fadeoutOpacityAnimation != old.fadeoutOpacityAnimation || this.mainAxisMargin != old.mainAxisMargin || this.crossAxisMargin != old.crossAxisMargin || this.radius != old.radius || this.minLength != old.minLength); } return(false); }
public RenderCustomPaint( CustomPainter painter = null, CustomPainter foregroundPainter = null, Size preferredSize = null, bool isComplex = false, bool willChange = false, RenderBox child = null ) : base(child) { preferredSize = preferredSize ?? Size.zero; this.preferredSize = preferredSize; _painter = painter; _foregroundPainter = foregroundPainter; this.isComplex = isComplex; this.willChange = willChange; }
void _paintWithPainter(Canvas canvas, Offset offset, CustomPainter painter) { int debugPreviousCanvasSaveCount = 0; canvas.save(); D.assert(() => { debugPreviousCanvasSaveCount = canvas.getSaveCount(); return(true); }); if (offset != Offset.zero) { canvas.translate(offset.dx, offset.dy); } painter.paint(canvas, size); D.assert(() => { int debugNewCanvasSaveCount = canvas.getSaveCount(); if (debugNewCanvasSaveCount > debugPreviousCanvasSaveCount) { throw new UIWidgetsError(new List <DiagnosticsNode> { new ErrorSummary( $"The {painter} custom painter called canvas.save() or canvas.saveLayer() at least " + $"{debugNewCanvasSaveCount - debugPreviousCanvasSaveCount} more " + "times than it called canvas.restore()." ), new ErrorDescription("This leaves the canvas in an inconsistent state and will probably result in a broken display."), new ErrorHint("You must pair each call to save()/saveLayer() with a later matching call to restore().") }); } if (debugNewCanvasSaveCount < debugPreviousCanvasSaveCount) { throw new UIWidgetsError(new List <DiagnosticsNode> { new ErrorSummary( $"The {painter} custom painter called canvas.restore() " + $"{debugPreviousCanvasSaveCount - debugNewCanvasSaveCount} more " + "times than it called canvas.save() or canvas.saveLayer()." ), new ErrorDescription("This leaves the canvas in an inconsistent state and will result in a broken display."), new ErrorHint("You should only call restore() if you first called save() or saveLayer().") }); } return(debugNewCanvasSaveCount == debugPreviousCanvasSaveCount); }); canvas.restore(); }
void _paintWithPainter(Canvas canvas, Offset offset, CustomPainter painter) { int debugPreviousCanvasSaveCount = 0; canvas.save(); D.assert(() => { debugPreviousCanvasSaveCount = canvas.getSaveCount(); return(true); }); if (offset != Offset.zero) { canvas.translate(offset.dx, offset.dy); } painter.paint(canvas, this.size); D.assert(() => { int debugNewCanvasSaveCount = canvas.getSaveCount(); if (debugNewCanvasSaveCount > debugPreviousCanvasSaveCount) { throw new UIWidgetsError( $"{debugNewCanvasSaveCount - debugPreviousCanvasSaveCount} more " + $"time{((debugNewCanvasSaveCount - debugPreviousCanvasSaveCount == 1) ? "" : "s")} " + "than it called canvas.restore().\n" + "This leaves the canvas in an inconsistent state and will probably result in a broken display.\n" + "You must pair each call to save()/saveLayer() with a later matching call to restore()." ); } if (debugNewCanvasSaveCount < debugPreviousCanvasSaveCount) { throw new UIWidgetsError( $"The {painter} custom painter called canvas.restore() " + $"{debugPreviousCanvasSaveCount - debugNewCanvasSaveCount} more " + $"time{(debugPreviousCanvasSaveCount - debugNewCanvasSaveCount == 1 ? "" : "s")} " + "than it called canvas.save() or canvas.saveLayer().\n" + "This leaves the canvas in an inconsistent state and will result in a broken display.\n" + "You should only call restore() if you first called save() or saveLayer()." ); } return(debugNewCanvasSaveCount == debugPreviousCanvasSaveCount); }); canvas.restore(); }
void _didUpdatePainter(CustomPainter newPainter, CustomPainter oldPainter) { if (newPainter == null) { D.assert(oldPainter != null); markNeedsPaint(); } else if (oldPainter == null || newPainter.GetType() != oldPainter.GetType() || newPainter.shouldRepaint(oldPainter)) { markNeedsPaint(); } if (attached) { oldPainter?.removeListener(markNeedsPaint); newPainter?.addListener(markNeedsPaint); } }
public override bool shouldRepaint(CustomPainter _oldPainter) { _RadialPainter oldPainter = _oldPainter as _RadialPainter; if (this.circles == oldPainter.circles) { return(false); } if (this.circles.Count != oldPainter.circles.Count) { return(true); } for (int i = 0; i < this.circles.Count; i += 1) { if (this.circles[i] != oldPainter.circles[i]) { return(true); } } return(false); }
public override bool shouldRepaint(CustomPainter oldPainter) { return(((oldPainter as _CupertinoActivityIndicatorPainter).position != position) || ((oldPainter as _CupertinoActivityIndicatorPainter).activeColor != activeColor)); }
public override bool shouldRepaint(CustomPainter oldPainter) { return(((_Placeholderpainter)oldPainter).color != color || ((_Placeholderpainter)oldPainter).strokeWidth != strokeWidth); }
public bool shouldRepaint(CustomPainter oldDelegate) { var oldPainter = oldDelegate as _MaterialPainter; return(oldPainter.mOffset != mOffset || oldPainter.mSize != mSize); }
public override bool shouldRepaint(CustomPainter oldDelegate) { _ShapeBorderPainter _oldDelegate = (_ShapeBorderPainter)oldDelegate; return(_oldDelegate.border != this.border); }
public override bool shouldRepaint(CustomPainter oldPainter) { return(color != ((_TextSelectionHandlePainter)oldPainter).color); }
public bool shouldRepaint(CustomPainter oldDelegate) { return(true); }
public override bool shouldRepaint(CustomPainter oldPainter) => false;
public override bool shouldRepaint(CustomPainter oldPainter) { return(this.origin != ((_TextSelectionHandlePainter)oldPainter).origin); }
public abstract bool shouldRepaint(CustomPainter oldDelegate);
public bool shouldRepaint(CustomPainter oldDelegate) { return(oldDelegate != this); }
public override bool shouldRepaint(CustomPainter oldDelegate) { ColorPainter colP = oldDelegate as ColorPainter; return(colP != null ? colP.info != info : false); }
public override bool shouldRepaint(CustomPainter oldPainter) { return(false); }
public override bool shouldRepaint(CustomPainter oldPainter) { return(((_TrianglePainter)oldPainter).color != color); }