PDA

View Full Version : i need help With PXL



paspas
18-04-2018, 11:04 AM
Hello;

I'm new with delphi and pxl and have some Questions.

1- how i can change the pixel size automatically when i create an full screen app

I think the code is myDevice.Windowed:= True; in Asphyre but not in PXL.

2- what is the equivalent of this code in pxl ? >

myCanvas.DrawRot(myImage, X, Y, Angle, Scale, Color, Trunc(Pattern), DrawFx);


Thanks!

LP
23-04-2018, 12:18 AM
1- how i can change the pixel size automatically when i create an full screen app

I think the code is myDevice.Windowed:= True; in Asphyre but not in PXL.

In form's create event, use this code:


BorderStyle := bsNone;
Left := 0;
Top := 0;
ClientWidth := Screen.Width;
ClientHeight := Screen.Height;
This should make the application full-screen.



2- what is the equivalent of this code in pxl ? >

myCanvas.DrawRot(myImage, X, Y, Angle, Scale, Color, Trunc(Pattern), DrawFx);


You can find equivalent in "Basic" example, which would look like this:


// Draw the image of famous Lenna.
EngineCanvas.UseImage(EngineImages[ImageLenna]);
EngineCanvas.TexQuad(TQuad.Rotated(
Point2f(DisplaySize.X * 0.5, DisplaySize.Y * 0.5),
Point2f(300.0, 300.0),
EngineTicks * 0.01),
IntColorAlpha(128));

paspas
23-04-2018, 08:36 PM
Thanks for your reply.
But the images size are not enlarged and fonts and other pixel size ?

https://preview.ibb.co/kYc3Yc/Untitled_2.png (https://ibb.co/hLiz6x)

LP
24-04-2018, 01:21 AM
Yes, changing display resolution nowadays to a non-native one isn't exactly desirable, and on mobiles it isn't even possible.

Therefore, for a project that was made for a fixed resolution, there are two ways to handle this:

1. Rescale everything in code yourself (might require significant development effort).
2. Render everything to a render target (check Tunnel example to see how you can use TBitmap for that) of fixed size, e.g. 640x480, then simply draw such render target to fit whole screen, which would take care of scaling and simulate older behavior.

paspas
25-04-2018, 08:46 AM
Thank you very much for your reply.

devchenxip
03-05-2018, 01:41 AM
Tulip-UI Editor for FMX

http://bbs.2ccc.com/topic.asp?topicid=546920

paspas
05-05-2018, 12:35 PM
Tulip-UI Editor for FMX

http://bbs.2ccc.com/topic.asp?topicid=546920

Thanks for sharing.

what about Particle Editor (https://asphyre.net/products/legacy/4-asphyreextreme) is it open source ??
Is there similar source that works with PXL ??

devchenxip
10-05-2018, 02:04 AM
Thanks for sharing.

what about Particle Editor (https://asphyre.net/products/legacy/4-asphyreextreme) is it open source ??
Is there similar source that works with PXL ??


I'm porting the particle editor from the phoenix engine to the PXL.

Vinzvega
22-05-2018, 05:20 PM
PXL is cool, a while ago, I have "commited" component for this library : Perhaps code could help, I have not yet finished to porting it to FPC. If someone is interested.
https://github.com/VincentGsell/PXLComponents