* * *

Author Topic: Does BGRABitmap support Vectorial?  (Read 1096 times)

hosune7845

  • Full Member
  • ***
  • Posts: 153
Does BGRABitmap support Vectorial?
« on: March 14, 2017, 08:00:18 am »
Hello,

I wonder if BGRABitmap supports vectorial.

Any idea?

Handoko

  • Hero Member
  • *****
  • Posts: 1404
  • My goal: build my own game engine using Lazarus
Re: Does BGRABitmap support Vectorial?
« Reply #1 on: March 14, 2017, 10:22:30 am »
I can be wrong, as far as I know BGRABitmap doesn't support full vector features but it has basic vector drawing tools like spline, bezier curve, path, gradient.

http://wiki.freepascal.org/BGRABitmap_Geometry_types

circular

  • Hero Member
  • *****
  • Posts: 2592
    • Personal webpage
Re: Does BGRABitmap support Vectorial?
« Reply #2 on: March 14, 2017, 08:31:56 pm »
You can save a path and then draw it. Also there is some basic support for SVG.

What would you like to do?
Conscience is the debugger of the mind

hosune7845

  • Full Member
  • ***
  • Posts: 153
Re: Does BGRABitmap support Vectorial?
« Reply #3 on: March 15, 2017, 03:06:42 am »
Thanks for all replies,

I want to draw text, load bitmap. only.

I think drawing a vectorial text is supported. like below
Code: Pascal  [Select]
  1. BGRABitmap.Canvas2D.Scale(1, 1); //Vector function
  2. BGRABitmap.Canvas2D.FillText('TEXT', 0, 0);
  3.  

But I could't find function for loading from TCanvas.

Any idea?
« Last Edit: March 15, 2017, 03:16:16 am by hosune7845 »

circular

  • Hero Member
  • *****
  • Posts: 2592
    • Personal webpage
Re: Does BGRABitmap support Vectorial?
« Reply #4 on: March 15, 2017, 08:01:24 am »
Indeed there is 2D transform for Canvas2D.

About loading, I am not sure to understand, but if you want to load a bitmap, simply do
TBGRABitmap.Create('filename.png');

See http://wiki.freepascal.org/BGRABitmap_tutorial_2
Conscience is the debugger of the mind

hosune7845

  • Full Member
  • ***
  • Posts: 153
Re: Does BGRABitmap support Vectorial?
« Reply #5 on: March 23, 2017, 09:41:55 am »
Thanks for all replies!

All replies were helpful for me!

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus