Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
Graphics / Re: Demo Scene Bitmap Font Scroller
« Last post by KodeZwerg on Today at 07:21:14 pm »
That's clever to use the font as mask, so you can do any gradient in it.  :)
I also was looking twice if I misread there something.
Last time I played with BitmapFontScrollers the Bitmap was colored to save some cycles of CPU.
Okay, it was back when I had my first 386 and every little cache and cycle needed to be used clever :D
So a new way of doing such is pretty welcomed  O:-)
(while I become never a fan of pre-initialized values for such, if colored in realtime, color can also be calculated in realtime)
(same with many variable that G uses, it works on his display/setting, but some code snippets are missing the initial values shown, like size for screen/image etc ^_^)
2
General / Re: what's difference between Variant and TVarRec?
« Last post by ASerge on Today at 07:09:52 pm »
They seem very similar. Well, TVarRec is variant record. But isn't variant variant record?
Do not confuse TVarRec with TVarData, which is the internal representation of Variant.
TVarRec is an element of the array of const.
3
General / Re: splitting an image
« Last post by KodeZwerg on Today at 07:07:21 pm »
Image2 will contain the left half and Image3 the right half from the original imagelist picture.
Code: Pascal  [Select][+][-]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var
  3.   LBMP: TBitmap;
  4.   HalfBMP: TBitmap;
  5.   X: Integer;
  6. begin
  7.   LBMP := TBitmap.Create;
  8.   try
  9.     HalfBMP := TBitmap.Create;
  10.     try
  11.       ImageList1.GetBitmap(0, LBMP); // here i do put the image from imagelist index 0 into LBMP
  12.       X := LBMP.Width div 2; // at that position I do split the image
  13.       HalfBMP.Width := X;
  14.       HalfBMP.Height := LBMP.Height;
  15.       // left half:
  16.       HalfBMP.Canvas.CopyRect(Rect(0, 0, X, LBMP.Height), LBMP.Canvas, Rect(0, 0, X, LBMP.Height));
  17.       Image2.Picture.Bitmap.Assign(HalfBMP);
  18.       // right half:
  19.       HalfBMP.Canvas.CopyRect(Rect(0, 0, X, LBMP.Height), LBMP.Canvas, Rect(X, 0, LBMP.Width, LBMP.Height));
  20.       Image3.Picture.Bitmap.Assign(HalfBMP);
  21.     finally
  22.       HalfBMP.Free;
  23.     end;
  24.   finally
  25.     LBMP.Free;
  26.   end;
  27. end;
4
General / Re: Debugger error
« Last post by bobonwhidbey on Today at 07:03:07 pm »
Turning off Windows Virus and threat security eliminated the 'Debugger error' and also, of course, the Windows Security message. At least I can now get further into the process of tracking down this bug.

Both the exe and the dbg files exist in the expected folder with the expected time and size.

Thank you Martin for telling me about the ability to exclude just one folder from virus scanning. I feel a lot better about just one folder than the entire PC being "unprotected". When I excluded just the folder with the "offending" files - no error message - although my bug is of course still there.
5
General / Re: How to: create DLL file for Windows 10 64-Bit Pro
« Last post by paule32 on Today at 07:02:31 pm »
Hello,

Quote
As mentioned very early by me, if file size is your only concern, Pascal is the wrong horse to ride with.

That is my problem, and concerns - the size of the code.
Nobody make itself headache about, how application's can run faster, and consume lesser memory, and space on storage devices.
All of all would always more and more - more bigger, to better.

I came from the MS-DOS time (okay, I am over 40 years old, now. But I came in contact with computer very early - thanks to my parents, and teachers, and friends aka copy and play pirated Amiga 500 games *prrr... :-) )
So, in this time, each byte and bit was counted.

And the slogan was from a very important person:
2.048 MegaBytes (2 MB) was enough - you know the story ?  :o

And as such, I was growing with this slogan.
Because a night of a file full with PSET commands, after this frustrating moment as I came to the 64k limit ...
This tend me to use Turbo Pascal overlays ...

And the story begun ...
C/C++ EMS Windows 3.11 32-Bit programming with a DPMI proxy application make me lazy.

Years ago after this, I end-up with the same problem again.
The data information's goes bigger, and bigger - all of us know the BORLAND Delphi, and C++Builder ...
where no one was splitting data from the binary executable...

This concept came later: with HTML and CSS.
Before, all data was compiled into EXE - which makes resource memory leaks very sneaky.

Nobody have to know why I do this all.
Nobody have to use the software that I provide.

But I hope that all of them can be informal, and useful.
This is my vision: Provide Informal, and useful services.
6
Linux / System.Now gives timestamp which is eight hours back
« Last post by alpine on Today at 06:58:15 pm »
Today I have installed a program written in FPC on a Debian 12 bookworm (32-bit) and to my surprise it logs all of its events with a timestamp which is 8 hours back in the past. Those stamps are result from calling the System.Now function.
The program runs properly on a several other Linux machines. I don't have a clue where the problem lies with that particular Debian machine.

Here is the output from timedatectl:
Code: [Select]
# timedatectl
               Local time: Wed 2024-04-24 19:47:15 EEST
           Universal time: Wed 2024-04-24 16:47:15 UTC
                 RTC time: Wed 2024-04-24 16:47:15
                Time zone: Europe/Sofia (EEST, +0300)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
and it is quite correct.

The printout from the program:
Code: [Select]
TimeLogNow: 135843986499, TimeLogToDateTime(TimeLogNow): 2024.04.24 11:49
Now: 2024.04.24 11:49, TimeLogFromDateTime(Now): 135843986499
The difference is exactly -8 hrs, (+2 min not relevant, execution difference)

Traced back the Now function until found an external:
Now -> GetLocalTime -> DoGetLocalDateTime -> fpgettimeofday -> external name 'FPC_SYSC_GETTIMEOFDAY'

Anybody have a clue?



7
Graphics / Re: Demo Scene Bitmap Font Scroller
« Last post by circular on Today at 06:53:32 pm »
That's clever to use the font as mask, so you can do any gradient in it.  :)
8
Graphics / Re: Your best UI design - contest
« Last post by circular on Today at 06:48:12 pm »
The future version of WinDS PRO, rebuilt in Lazarus.
Square tile style?  :)
9
General / Re: Web Applications with Pascal
« Last post by 1HuntnMan on Today at 06:44:00 pm »
Nate,
   In the past I've used PHP for developing web forms, etc.  We weren't designing a website we were working on an application with the data stored on a web server at the company. The company is just using the internet as the network.  Good idea, huh!
   I've been writing programs with pascal back to the Turbo Pascal days in the 1980's and love pascal.  But, haven't tried writing an app in Las/FPC for what we used PHP but, to me it's a similar endeavor and PHP looks similar to pascal code...
10
General / Re: splitting an image
« Last post by Dzandaa on Today at 06:40:45 pm »
Hi
@madref, there is a TBGRAImageList in the BGRABitmap distribution, but I didn't try it yet...

https://wiki.lazarus.freepascal.org/BGRAControls#TBGRAImageList

B->
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018