e.DoThis (value: integer);
begin
writeln('did this ', value);
end;
var
delegate: TMyDelegate;
begin
delegate := TMyDelegate.Create;
TestDelegate(delegate);
end.
Regards,
Ryan Joseph
thealchemistguild.com
__
elegate) then
>intfDelegate.DoThis
Regards,
Ryan Joseph
thealchemistguild.com
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
wrote:
> For CORBA interfaces do
>
> IMyInterface = interface
> ['myintf']
>procedure DoThis (value: integer);
>end;
>
> if delegate.GetInterface('myintf', intfDelegate) then
> intfDelegate.DoThis
Regards,
> don't have reference counting built-in).
That was useless code, you're right, thanks.
Regards,
Ryan Joseph
thealchemistguild.com
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
41 AM, Ludo Brands wrote:
> http://www.freepascal.org/docs-html/rtl/sysutils/supports.html
>
>> I'm getting an identifier not found error with the procedure
>> "Supports". Where is this defined?
Regards,
Rya
. A small simple solution
would be best if that’s possible.
Thanks.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
work. There is the guide I found but is there any more
complete examples I could look at? Too much is missing to understand exactly
how all these classes work together.
http://wiki.freepascal.org/fcl-image
Thanks.
Regards,
Ryan Joseph
___
t
http://www.sulaco.co.za/opengl_project_BMP_JPG_TGA_texture_loader.htm which
follows a similar procedure but it’s Delphi and I couldn’t get it to run on FPC
on my anyways.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal
mt_png.pas
But can I then access the pixel data so I can hand it to glTexImage2D and make
the texture? I think the FPC RTL classes on
http://wiki.freepascal.org/fcl-image would do this also but again it’s not
clear how to get the pixel data for glTexImage2D
Thanks.
Re
es on Mac but I
want to replace it with a cross platform solution that would run on
Windows/Linux also that doesn’t rely on CoreGraphics libraries.
I think the classes in FPimage/FPCanvas from the RTL do this already so why do
we need to use CoreGraphics and Apple-only libraries?
Regards,
FreeMemory(bitmapData);
CFRelease(colorSpace);
end;
end;
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
code the raw image data is sufficient for glTexImage2D so
I wonder if the data pointer returned from BeRoPNG would work also?
In my Apple CoreGraphics code I was drawing the image into a bitmap context and
getting pixel data from the bitmap but that seems to be an extra step now.
Regards,
nuous block of memory in this class
but I can’t seem to find it using the colors/pixels property. What am I missing?
==
http://lazarus-ccr.sourceforge.net/docs/fcl/fpimage/tfpmemoryimage.html
http://lazarus-ccr.sourceforge.net/docs/fcl/fpimage/tfpcustomimage.html
Rega
n abstract class
but TFPMemoryImage apparently has stored values so I should be able to access
the “Data” property but these seem to be accessors to getting single pixel
values so I can’t just pass the entire block into glTexImage2D like you did.
Regards
to implement also, being just a single function.
Thanks.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
ample at
http://wiki.freepascal.org/fcl-image#Drawing_text which uses TFPMemoryImage.
Thanks for the example, I’ll give this a try.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
try to dig around
the FPC sources to find these things? There are dozens of classes available at
http://wiki.freepascal.org/fcl-image but I don’t know what any of them do.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.f
ascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
where I could reference that online (.net maybe?).
Sorry for being vague but I’m starting from absolute ground zero. ;) Thanks.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin
> On Oct 22, 2015, at 6:07 PM, Graeme Geldenhuys
> wrote:
>
> On 2015-10-22 05:20, Ryan Joseph wrote:
>> Keeping in mind I know literally nothing about Windows programming,
>> where is a good place to start?
>
> Start reading MSDN and study the Win32 API.
Loo
controlpascal.com/tutorial.htm
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
and a place I could reference the Windows headers in Pascal?
>
> MSDN, nowhere else despite they only have documentation for languages they
> support (C++, C#, VB, perhaps F#).
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@li
tools so those are in the way but the biggest problem is
how everything is broken up into separate windows. Could that be changed?
Thanks.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freep
you can use it for example
> for console applications as well (like the compiler) which definitely aren't
> RAD. For your purposes you'd just need to start with the correct project
> template and the IDE would still assist you with its powerful codetools.
&g
take the higher learning curve route and break down the
OpenGLControl demo and use TOpenGLControl?
Thanks.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc
S2.0, and has support for an OpenVG context if
> users prefer a much easier to work with 2D API.
> ___
> fpc-pascal maillist - fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Regards,
eeglut/bin/freeglut.dll'));
Did I miss something?
Thanks.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Functions like glBlendEquation from GLExt are crashing (access violation)
compiling on Mac with ppc386. The functions didn’t get loaded I think for some
reason.
Is this is known problem on Mac with a work around perhaps?
Thanks.
Regards,
Ryan Joseph
from
/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib
$0001000CDEF7
$0001000D0F85
> On Jan 29, 2016, at 10:40 AM, Ryan Joseph wrote:
>
> Does this work on OpenGLES 1.x do you know? I’m going to try this on iOS also.
Regards,
Ry
n, *not* for OpenGLES.
> For Android and iOS, use GLES20 unit. My Castle Game Engine uses this
> for Android and iOS and it works cool:)
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.o
> (assuming Load_GL_version_1_2 returned true) glBlendEquation will be
> non-nil and will work OK.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-2-0-ios
> On Jan 29, 2016, at 11:14 AM, Michalis Kamburelis
> wrote:
>
> Indeed, glBlendEquation is simply not available in OpenGLES 1.1.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepas
os.org/registry/gles/extensions/OES/OES_blend_subtract.txt
> . If this extension is supported, you could load glBlendEquationOES
> function, which should be what you need.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal
make sense here but I’m
not sure.
Any ideas? Thanks.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Good idea, thanks.
> On Feb 21, 2016, at 9:08 PM, leledumbo wrote:
>
> Learn how Castle Game Engine and ZenGL managed to do it. They don't use JVM,
> but the ARM target of the compiler.
Regards,
Ryan Joseph
___
fpc-pascal
se engines like CGE give you more comfortable API for rendering,
> on top of this.
So internally Android just uses the same C libraries we were using in Pascal? I
guess that makes sense but I was thinking EVERYTHING on the system was now Java
but that’s not the c
e] Error 2
make[1]: *** [compiler_cycle] Error 2
make: *** [build-stamp.arm-android] Error 2
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
makes sense but I was thinking EVERYTHING on the system was now
> Java but that’s not the case I guess. The lesson here is that Android is
> built on Linux so we’re sharing more than I think.
This will probably make more sense when I learn about the asset manager more. I
think I read there
ndif
> #ifdef cpu386
> -Fl/home/michalis/.../android/ndk/platforms/android-19/arch-x86/usr/lib/
> #endif
> #endif
>
>
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
n Sat, 26 Mar 2016, Ryan Joseph wrote:
>
>> What are all the performance costs associated with subclassing TPersistent
>> for RTTI information? I want to use this in some classes but
>> unfortunately the way my code is written I need to basically make all my
>> classes de
e the RTTI after the class definition.
>
> For example:
>
> {$M+}
> TtiVisited = class(TObject)
>... define your class interface here...
> end;
> {$M-}
Regards,
Ryan Joseph
___
fpc-pascal maill
procedure DoSomething; virtual; abstract;
end;
“main” unit which implements the class:
type
TSomeClass = class (TSomeClassAbstract)
procedure DoSomething; override;
end;
Regards,
Ryan Joseph
___
fpc-pascal maillist -
method invocation and more recently interfaces to workaround. Don’t tell me
this has been around for 20 years now I just never knew about it. ;) I should
have asked sooner that’s for sure.
Thanks!
Regards,
Ryan Joseph
___
fpc-pascal maillis
and always returns a reference to itself because the children
// often need to know about the parent also
IClassA = interface
procedure ClassDidThis (parent: TClassA; action: integer);
end;
Regards,
Ryan Joseph
___
fpc-pascal maillist
en smart to learn about Delphi
and new features but I just went ahead as normal missing lots of things that
would help me in future years, like today for example. :)
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.fr
lassB and it’s not exclusive
to TClassA so putting them in the same unit doesn’t make sense.
Maybe I’m doing something stupid but other languages have forward declarations
so I wonder why Pascal isn’t doing this also since it seems like the obvious
solution.
Regards,
better way. However I think I
like your idea of using them in conjunction with the uses in the implementation
instead of my "abstract class" solution. Thanks for the tip.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
actical and efficient solution that
requires lots of extra work in design or typecasting/interfaces.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
classes more than mixing 2
mutually exclusive classes into one unit even though they may have dependancies
on each other. Editing and navigating the files would be confusing for one
since there’s no obvious name to use for the file now.
Regards,
ith one other unit. TClassB is communicating with TClassA via
interfaces but it’s still useful standalone and distinct in nature.
This happens to me all the time actually where I need to expose some type
information or an interface to both classes because I don’t want them merged.
Regards,
ject[HClassB]" to “TClassB" or throws an error if the
identifier TClassB is not found
value.DoSomething(self);
end;
end.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
ting is perhaps
more work but maybe I’m not getting it.
Thanks.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
pecasting ugliness.
Thanks.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
and even crashing the
compiler (seg faults).
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
> On Apr 15, 2016, at 6:26 PM, Ryan Joseph wrote:
>
> I remember trying to doing pre-parser type things using macros but the think
> the conclusion is they don’t work by just replace text like in C.
>
> I’m trying an example like this but getting errors and even crashing th
but it would
even better if the compiler was more friendly here. If there was a good pre
parser in FPC I’d just make some custom syntax but that’s not an option either
as far as I know.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pas
lassBObject: TClassB;
begin
result := TClassB(FClassBObject)
end;
procedure TClassA.SomeProc;
begin
aClassBObject.OtherProc;
end;
end.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/c
could be
made to work with FPC or if not something more similar than not. iOS from Free
Pascal works but Java is more complicated from what I’ve been learning.
Thanks.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal
ve iOS development in FPC so it
wasn’t that useful. I think the forms do this but I haven’t found out yet.
Thanks.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
e Xamarin looks easiest because Android seems like it’s
going to be hard to get working as well as iOS.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
in the command prompt and this is coming from a UNIX user. ;)
Thanks.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
lf but I’m struggling trying to figure out the command prompt program. Copy
and paste should be easier than this. Is there another terminal that Windows
users like? I really don’t understand why you can’t just paste or select text
like you would in any other terminal.
Regards
.y - self[i].y) / (self[j].y - self[i].y) + self[i].x) then
c := not c;
end;
result := c <> 0;
end;
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
ht
it requires an explanation makes my worry about how easy it
is to mess up. :)
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
]) + vertx [i]))
> c = !c;
>
> j = i;
>i = i + 1;
> }
>
> return c;
> }
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
for high
performance situations. Is there a better way to do this or should I not use
interfaces like this in FPC?
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman
the purpose of this
is and why it’s even useful.
> On Nov 10, 2016, at 6:45 PM, Ryan Joseph wrote:
>
> Some times when I want to communicate with a class I don’t have full scope
> access to I’ll use interfaces and the Supports function to call a method.
> I’ve noticed however
lly is. In my first test this didn’t
happen and I was able to use an interface as a type then cast it to an object,
pass to a function and call a method. In the 2nd example the variable went from
a couple classes first and died at the end. Seems very unstable.
Regards,
Ryan Joseph
I ditch CORBA in favor or COM?
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
ases (but better
than my previous solution using Supports for all access).
I’m trying your code example now and I get "Class or COM interface type
expected, but got “IMyInterface”” when I try to cast with “as”. I was using
{$interfaces corba} so maybe that’s the problem?
R
to do just
> that (generate smaller GUID values of about 6 characters long).
I’m not sure all Supports does but I didn’t test shorter strings yet. I think
it does more than just compare strings though. Maybe I’ll try that later thanks.
Regards,
Ryan Joseph
___
I’m getting suggest memory is being trashed by the compiler at some
point without my knowledge. I never explicitly allocate an interface like an
object so there’s nothing to manage in my mind.
Regards,
Ryan Joseph
___
fpc-pasc
ct1 := TMyObjectClass.Create;
MyInterface := MyObject1;
MyInterface.MyProc;
MyObject2 := TMyObjectClass(MyInterface);
MyObject1.Free {OK for CORBA - will cause an exception in COM}
{MyObject1, MyObject2 and MyInterface are now all invalid}
end;
Regards,
Ryan Joseph
ly not a good solution.
More on this tomorrow until I give up for certain. :)
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
here and it defeats the purpose
ObjInt := Arr.GetObject(0) as IMyInterface;
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
an up the problem further but I need to adapt
more code to make that work easily and removing the constant Support calls is
good enough to put my mind at ease. :)
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal
I have a generic record I would like to enumerate using for..in loops. Is this
even possible? I tried briefly and it wasn’t clear this was possible so I
thought I’d ask first. Thanks.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc
yan Joseph wrote:
>
> There’s a class nested inside a class?? I never saw that before. What are all
> the inlines for btw?
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal
There’s a class nested inside a class?? I never saw that before. What are all
the inlines for btw?
> On Nov 30, 2016, at 3:09 PM, Sven Barth wrote:
>
> Take a look at packages/fcl-stl/src/gvector.pp, it's a generic vector
> container that provides an enumerator.
>
>
I want it to be stored on the stack. It’s trivial to just enumerate the
array inside the record but I wanted to try the more elegant solution of
making an enumerator for the record.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@
> On Nov 30, 2016, at 6:22 PM, Marco van de Voort wrote:
>
> * (for..in) Enumerators in records
Where’s an example of this? I’m trying it with a generic record and I can’t it
to compile so I’m not sure if this is supported or not.
Regards,
Ry
s I just learned but nested classes feel messy. Is
there at least some namespace protection? That would be a benefit I suppose if
the class was only ever used inside that class but a unit may be a better
option in that case.
Regards,
Ryan Joseph
___
Yes but the problem is doing this with generics. :) That’s where I got stuck
and I don’t think it’s possible.
> On Dec 2, 2016, at 4:58 AM, Sven Barth wrote:
>
> I've attached an example that shows how this *can* be done (it's not the
> only way to do this however).
.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
nd return it back to
the caller? In your example how could I return 5 to “i” inside GetSomething?
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
like I was
planning. Thanks for helping.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
obj.Retain;
end
else
obj := nil;
TObjectPtr(io)^ := obj; // crashes here
end;
var
foo: TMyObject;
something: TMyObject;
foo := TMyObject.Create;
RetainObject(something,
tly?
if h < 8 then
u := x
else
u := y;
double u = h < 8 /* 0b1000 */ ? x : y;
Thanks for helping.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
> On Jan 8, 2017, at 5:36 PM, Ryan Joseph wrote:
>
> Casting TObject(input) := obj; worked but the value of “io” is still not
> getting set. Because it’s a var I expected the value to be returned to the
> caller.
Never mind, I got it working, stupid mistake in my testing.
would take the time to learn Free Pascal
more since it always pays off in the end.
Casting TObject(input) := obj; worked but the value of “io” is still not
getting set. Because it’s a var I expected the value to be returned to the
caller.
Regards,
Ryan Joseph
_
++) {
p[x] = permutation[x%256];
}
}
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
x := x mod repeatValue;
y := y mod repeatValue;
z := z mod repeatValue;
end;
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
> On Jan 8, 2017, at 6:55 PM, Ryan Joseph wrote:
>
> why am I getting this error? Operator is not overloaded: "Double" mod
> “LongInt”. Mod can’t be used with double and integers like in C?
Sorry for the repeat. Same error here but "Operator is not overloaded:
und even.
http://www.freepascal.org/docs-html/rtl/math/index-5.html doesn’t show this
function exists either.
I thought (int)x was just type casting and didn’t actually transform the
number. That’s confusing.
Regards,
Ryan Joseph
___
fpc-pascal m
I’d like to draw a bitmap pixel by pixel then save to disk but I can’t understand the docs available online. I know there’s a BGRABitmap class with direct pixel access but I wasn’t able to find the unit in my FPC distribution.I used the image canvas before to draw bitmap fonts so I have this code w
> On Jan 20, 2017, at 8:31 AM, Ryan Joseph wrote:
>
> Thanks guys,
>
> Here’s the new program based on your example but it still just outputs a pure
> black image.
never mind! The max color value is 65535. I thought it was 1.0 or 255. Got it
working now. Thanks again.
Reg
for x := 0 to image.Width-1 do
for y := 0 to image.Height-1 do
image.Colors[x, y] := FPColor(255, 0, 0, 255);
writer := TFPWriterPNG.Create;
writer.Indexed := False;
image.SaveToFile('bitmap.png', writer);
end;
x := Power((x shr 16), x);
result := x;
end;
Thanks for any ideas you have.
Regards,
Ryan Joseph
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
1 - 100 of 1179 matches
Mail list logo