Recent

Author Topic: [DONE - NOT SOLVED] AutoSize BCSVGViewer to SVG image  (Read 277 times)

pixelink

  • Hero Member
  • *****
  • Posts: 1178
    • Pixelink Software
[DONE - NOT SOLVED] AutoSize BCSVGViewer to SVG image
« on: July 17, 2019, 12:01:57 am »
I tried to use BCSVGViewer.AutoSize:=True, but the container width/height doesn't work conform the svg w/h.


I can load am SVG directly.

But I want to beable to use Zoom In/Out instead of stretching to fit container


But, I can seem to get the width/height to autosize to the actual svg width/height.... we are talking about the border of the BCSVGViewer resizing here.


Any ideas how to get around this?
« Last Edit: July 18, 2019, 12:02:14 am by pixelink »
Can't Type - Forgetful - Had Stroke = Forgive this old man!

Pixelink Software
LAZ 2.02 •  VSSTUDIO(.Net) 2019 • Win10 • 16G RAM • Nivida GForce RTX 2060

circular

  • Hero Member
  • *****
  • Posts: 3058
    • Personal webpage
Re: AutoSize BCSVGViewer to SVG image
« Reply #1 on: July 17, 2019, 10:28:46 pm »
I am not sure I understand though I imagine you would like to zoom and move around the SVG. TBVSVGViewer provides only basic placement/stretching.

For this, you need to use for example a TBGRAVirtualScreen and draw the SVG the way you want in it. There are various drawing functions that take coordinates and zoom level.

The AutoSize property may need some fix, because in theory, the SVG would then be the size according to some default DPI.
Conscience is the debugger of the mind

pixelink

  • Hero Member
  • *****
  • Posts: 1178
    • Pixelink Software
Re: AutoSize BCSVGViewer to SVG image
« Reply #2 on: July 18, 2019, 12:01:48 am »
I am not sure I understand though I imagine you would like to zoom and move around the SVG. TBVSVGViewer provides only basic placement/stretching.

For this, you need to use for example a TBGRAVirtualScreen and draw the SVG the way you want in it. There are various drawing functions that take coordinates and zoom level.

The AutoSize property may need some fix, because in theory, the SVG would then be the size according to some default DPI.

Yeah, I know its scalable, but it does have an initial size that it was created at.

I was thinking the Autosize just like a TImage... the border conforms to the image dimension.

Was just wondering. Thanks

Can't Type - Forgetful - Had Stroke = Forgive this old man!

Pixelink Software
LAZ 2.02 •  VSSTUDIO(.Net) 2019 • Win10 • 16G RAM • Nivida GForce RTX 2060

circular

  • Hero Member
  • *****
  • Posts: 3058
    • Personal webpage
Re: AutoSize BCSVGViewer to SVG image
« Reply #3 on: July 18, 2019, 01:29:32 pm »
Yeah, I know its scalable, but it does have an initial size that it was created at.

I was thinking the Autosize just like a TImage... the border conforms to the image dimension.
Indeed. I think it is just not implemented yet.
Conscience is the debugger of the mind