Flutter canvas. How to draw frustum or add a frustum to a basic graphic?

92 views Asked by At

I know how to draw a basic graphics,

  canvas.drawCircle();
  canvas.drawPolygon();

  ...

Is there any way to draw a frustum make it to 3d? Like those:

enter image description here

enter image description here

1

There are 1 answers

0
spydon On

The 3D effect in the shapes that you posted most likely get their effect from shaders, not from a frustum. There are some limited abilities to use some shaders in Flutter, you can read more about it here: https://wolfenrain.medium.com/flutter-shaders-an-initial-look-d9eb98d3fd7a