Recent

Author Topic: [Tips] Circuit Simulator  (Read 6656 times)

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: [Tips] Circuit Simulator
« Reply #15 on: October 04, 2019, 01:25:52 am »
Hi!

Do a "Cleanup and compile". This should throw away all old unused stuff.

If this doesnt help try

Code: Pascal  [Select][+][-]
  1. Application.Icon.Assign(Form1.Icon);

Winni

metallaro1980

  • New Member
  • *
  • Posts: 38
Re: [Tips] Circuit Simulator
« Reply #16 on: March 16, 2020, 03:32:39 pm »
I have fixed the export to bmp/jpeg

now
i wanna know if it is possible to save a tbitmap canvas to a svg or another vectorial file.
thank you very much.

eljo

  • Sr. Member
  • ****
  • Posts: 468
Re: [Tips] Circuit Simulator
« Reply #17 on: March 16, 2020, 07:02:03 pm »
I have fixed the export to bmp/jpeg

now
i wanna know if it is possible to save a tbitmap canvas to a svg or another vectorial file.
thank you very much.
search for fpc metafile control/canvas for windows. you can use it to create a metafile from canvas commands. AS for svg you need to write your own svg canvas or buy a ready made svg library that supports svg creation.

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: [Tips] Circuit Simulator
« Reply #18 on: March 16, 2020, 07:21:41 pm »
Hi!

BGRAcanvas2D together with BGRAsvg allows to draw and save SVG files.

The BGRAbitmap package is available through the Online Package Manager.

Winni

metallaro1980

  • New Member
  • *
  • Posts: 38
Re: [Tips] Circuit Simulator
« Reply #19 on: March 18, 2020, 12:39:59 am »
yes
but in order to save the circuit in a bmp (because the tpaintbox is inside a scrollbox) i changed some of my code
the components are drawed stored in a canvas of a tbitmap.
with bitblt function (it works also in linux) i do a simply copy operation on a tpaintbox canvas (on paint event of the paintbox)
so i can copy the canvas of tbitmap to a bgrabitmap but how i can store the canvas in bgracanvas2d?

jamie

  • Hero Member
  • *****
  • Posts: 7891
Re: [Tips] Circuit Simulator
« Reply #20 on: March 19, 2020, 12:02:36 am »
Canvases are not storage media, they are a path to paint and read form as a proxy mechanism.

I don't know if the bga components has a abgaBitmap but you can use a TRawImage from a Tbitmap which is a background storage media for your image and can be set to a 32 bit so that it contains an alpha channel.



The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018