O'Reilly logo

Expert Delphi by Paweł Głowacki

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Custom Wireframe component

The source code of FireMonkey is very helpful in understanding how the library works, but we can also use it as a template to build our own custom components. Rendering a cube is not a lot of code but using a similar approach, we could create a custom wireframe component that is similar to TStrokeCube. We can just implement the Render method differently and paint arbitrary lines, the coordinates of which are stored internally within our component.

Create a new Delphi multi-device application and select 3D Application as the application type. Save the main form unit as uFormWireframe and the whole project as WireframeTest. Rename the form as FormWireframe. Save all.

Add a new unit to the project and save it as

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required