Re: [Lazarus] How to create a transparent PNG?

2016-03-19 Thread Vojtěch Čihák

Hi,
 
there also must be
 
P.Canvas.Brush.Style:=bsClear;
 
before drawing text.
 
V.
__

Od: Gabor Boros 
Komu: 
Datum: 16.03.2016 20:27
Předmět: [Lazarus] How to create a transparent PNG?


Hi All,

I want to draw onto a PNG image and save it without background. Tried 
Transparent, TransparentColor, TransparentMode properties without 
success. I need the A character in the PNG with black color without 
background. Any idea?


procedure PNG;
var
  P:TPortableNetworkGraphic;
begin
  P:=TPortableNetworkGraphic.Create;
  P.SetSize(20,20);
  P.Canvas.TextOut(0,0,'A');
  P.SaveToFile('TEST.PNG');
  P.Free;
end;

Gabor

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus 


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to recover from Fatal: Invalid PPU-File entry 121

2016-03-19 Thread Donald Ziesig

On 03/19/2016 06:27 PM, Donald Ziesig wrote:

Hi All!

I've been happily coding away all day on my Raspberry Pi 2B+, when all 
at once I got the error:


Compile package LCL 1.7 : Exit code 256, Errors 1
Fatal: Invalid PPU-File entry 121

I tried rebuilding using Run | Clean up and Build, but got the same 
error (after a few minutes of compiling, assembling, ... ).


The error message is rather cryptic for a user as opposed to a 
developer.  What is PPU-File entry 121?


I am going to try shutdown and restart after I send this email. (Works 
for Windows, so... :-D )


Well, looks like it works for Raspbian as well as Windows. Shutdown, 
power off, reboot and rebuild ran to completion and I can now go back to 
happily coding :-) .  I wonder if we will have to do this if our Google 
Cars stop running.


I'm using:

Lazarus 1.7 dated 01-22-2016
FPC 3.0.0
SVN 51308

The OS is the latest version of raspbian as of the end of January.


Any advice (well almost any advice ;-) ) will be appreciated.

Thanks,

Don Ziesig

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus





--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to recover from Fatal: Invalid PPU-File entry 121

2016-03-19 Thread Mattias Gaertner
On Sat, 19 Mar 2016 18:27:01 -0400
Donald Ziesig  wrote:

> Hi All!
> 
> I've been happily coding away all day on my Raspberry Pi 2B+, when all 
> at once I got the error:
> 
> Compile package LCL 1.7 : Exit code 256, Errors 1
> Fatal: Invalid PPU-File entry 121

It means either you have a broken ppu file, or you spotted a bug in the
compiler.
First try to build clean.
If this does not work, try to find the broken ppu file by compiling
with -vut.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] How to recover from Fatal: Invalid PPU-File entry 121

2016-03-19 Thread Donald Ziesig

Hi All!

I've been happily coding away all day on my Raspberry Pi 2B+, when all 
at once I got the error:


Compile package LCL 1.7 : Exit code 256, Errors 1
Fatal: Invalid PPU-File entry 121

I tried rebuilding using Run | Clean up and Build, but got the same 
error (after a few minutes of compiling, assembling, ... ).


The error message is rather cryptic for a user as opposed to a 
developer.  What is PPU-File entry 121?


I am going to try shutdown and restart after I send this email. (Works 
for Windows, so... :-D )


I'm using:

Lazarus 1.7 dated 01-22-2016
FPC 3.0.0
SVN 51308

The OS is the latest version of raspbian as of the end of January.


Any advice (well almost any advice ;-) ) will be appreciated.

Thanks,

Don Ziesig

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] How to create a transparent PNG?

2016-03-19 Thread Gabor Boros

Hi All,

I want to draw onto a PNG image and save it without background. Tried 
Transparent, TransparentColor, TransparentMode properties without 
success. I need the A character in the PNG with black color without 
background. Any idea?


procedure PNG;
var
  P:TPortableNetworkGraphic;
begin
  P:=TPortableNetworkGraphic.Create;
  P.SetSize(20,20);
  P.Canvas.TextOut(0,0,'A');
  P.SaveToFile('TEST.PNG');
  P.Free;
end;

Gabor

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] ActiveX in Lazarus and classic ASP

2016-03-19 Thread Michael Van Canneyt



On Thu, 17 Mar 2016, Marcos Douglas wrote:


Hi,

I would like to know if is possible to made an ActiveX component using
FPC/Lazarus. This component will be used integrated with a classic ASP
web application.


As far as I know, the only thing you need to do is create a class that
implements IDispatch. You hardly need a wizard for that, I think ?


I make these components using Delphi 7 but I would like to use Lazarus.

I installed the LazActiveX package, but I did'nt see an option to use
something like "New>ActiveX..."


The activeX package registers a type library import item under tools,
and adds a component TActiveXContainer to the component palette.
This is to create visual controls that can be used using ActiveX.


Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to create a transparent PNG?

2016-03-19 Thread Dmitry Boyarintsev
On Wed, Mar 16, 2016 at 3:25 PM, Gabor Boros  wrote:

> I want to draw onto a PNG image and save it without background. Tried
> Transparent, TransparentColor, TransparentMode properties without success.
> I need the A character in the PNG with black color without background. Any
> idea?
>
> procedure PNG;
> var
>   P:TPortableNetworkGraphic;
> begin
>   P:=TPortableNetworkGraphic.Create;
>   P.SetSize(20,20);
>   P.Canvas.TextOut(0,0,'A');
>   P.SaveToFile('TEST.PNG');
>   P.Free;
> end;
>
IIRC this is a bug in PNG component. Try to make at least one pixel
half-transparent.

thanks,
Dmitry
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Aarch64 as CPU target for RPi3 with Linux as OS

2016-03-19 Thread Alfred

Hello,

I would like to inform you that Lazarus / FPC runs smooth on an 
Odroid-C2 under aarch64 (arch linux).


Proof: 
https://drive.google.com/file/d/0B96fg3TpL5RDWnJiMUwyQ21hM00/view?usp=sharing


I hope that RPi3 will follow soon !

Many thanks for the good work !!!--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] ActiveX in Lazarus and classic ASP

2016-03-19 Thread Marcos Douglas
Hi Michael,

On Fri, Mar 18, 2016 at 6:00 AM, Michael Van Canneyt
 wrote:
>
> As far as I know, the only thing you need to do is create a class that
> implements IDispatch. You hardly need a wizard for that, I think ?

Well, using Delphi 7 I click in 'New'>'ActiveX'>'Active Server Object'.
After type the "CoClass Name" -- TFooClass for example -- and choose
some parameters, the IDE creates:
1. An unit contents a pre-implementation of my class:
uses
  ComObj, ActiveX, AspTlb, Project1_TLB, StdVcl;
type
  TFooClass = class(TASPObject, IFooClass)
  protected
procedure OnEndPage; safecall;
procedure OnStartPage(const AScriptingContext: IUnknown); safecall;
  end;

2. A file like "project_TLB.pas" that have, between others things:
  IFooClass = interface;
  IFooClassDisp = dispinterface;
...
  CoFooClass = class
class function Create: IFooClass;
class function CreateRemote(const MachineName: string): IFooClass;
  end;
...
class function CoFooClass.Create: IFooClass;
begin
  Result := CreateComObject(CLASS_FooClass) as IFooClass;
end;

class function CoFooClass.CreateRemote(const MachineName: string): IFooClass;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_FooClass) as IFooClass;
end;

3. An "wizard" to insert new methods to simplify, I think, and a
"Text" is created on demand like that:
FooClass = coclass(IFooClass [default] )
  [ uuid '{E984E6AF-C43A-4B34-BF96-E03B43AC6A3E}',
version 1.0,
helpstring 'FooClass Object' ];

But I don't know if is relevant... anyway.


So, how an new FPC programer should know these things to make a ActiveX?
I could be wrong, but I don't think just implement IDispatch is enough, do you?

Best regards,
Marcos Douglas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus