Coder Social home page Coder Social logo

codebot.cross's Introduction

Codebot Cross Platform Library

This is the official git repository for the Codebot Cross library. It contains the source and assets code for three Free Pascal packges.

The official landing page for the library with detailed information, including installation, documentation, and examples about this library is located here.

Package Codebot

The Codebot package defines types and routines for general purpose use. These include items such as string and file system handling, collections, advanced graphics contexts, networks sockets, animation, and much more.

Package Codebot Control

The Codebot Controls package defines classs and routines related to visual controls. Many of these controls are original, unique, and all make use of the advanced ISurface cross platform drawing context provided by the Codebot package. Some of the controls in this pake include TContentGrid, TIndeterminateProgress, THuePicker and more. Custom forms and custom IDE designers are also included in this package.

Package Codebot Rendering

The Codebot Rendering package provides a organzied and easy to use class library for working with OpenGL ES, shader programming, vertex, render, and pixels buffers, as well as input processing.

codebot.cross's People

Contributors

sysrpl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codebot.cross's Issues

Bug in NewGdiCheckerBrush

You have
B := TGdiBitmap.Create(Size * 2, Size * 2)
But i have error "codebot.interop.windows.gdiplus.pas(11906,45) Error: Can't determine which overloaded function to call"

In my opinion correct version is
B := TGdiBitmap.Create(Size * 2, Size * 2,G)

readme issue

defines classs and routines

  1. pls show all included controls, how they look, inside the readme. Ie make the subdir for pictures and link pics in the readme Markdown.

Compiler bug in gdiplus.pas

Lazarus 2.0.12
FPC 3.2.0
SVN Revision: 64642.
Downloaded the zip file code.codebot-master
loaded the package codebot and hit compile.
Compilation error in gdiplus.pas, line 11906: Can't determine which overloaded function to call. Function in question is TGdiBitmap.create(size * 2, Size * 2)
This is really weird. I checked all the constructors you have in this class:

  {01}  constructor Create(Bitmap                       : GpBitmap                                                                                ); overload;
  {02}  constructor Create(Filename                    : WideString; UseEmbeddedColorManagement: Boolean = False); overload;
  {03}  constructor Create(Stream                      : IStream      ; UseEmbeddedColorManagement: Boolean = False); overload;
  {04}  constructor Create(Width, Height, Stride : Integer       ; Format                                       : TPixelFormat     ;
                                        scan0                        : PByte                                                                                       ); overload;
  {05}  constructor Create(Width, Height            : Integer      ; Format: TPixelFormat = PixelFormat32bppArgb     ); overload;
  {06}  constructor Create(Width, Height            : Integer      ; Target : IGdiGraphics                                             ); overload;
  {07}  constructor Create(surface                       : IDirectDrawSurface7                                                                ); overload;
  {08}  constructor Create(var BitmapInfo           : TBitmapInfo; BitmapData                                : Pointer            ); overload;
  {09}  constructor Create(Bmp                          : HBitmap      ; Pal                                             : HPALETTE        ); overload;
  {10}  constructor Create(Icon                          : HICON                                                                                     ); overload;
  {11}  constructor Create(hInstance                 : HMODULE  ; BitmapName                               : WideString      ); overload;

It seems to me that the call at line 11906 is calling constructor number 5 which has a signature that is different from the signatures of the other constructors. Further, the superclass TGDImage does not have a constructor that could clash with constructor number 5. The same holds true for TInterfacedObjet and TObject.

Could that be a bug in the compiler?

TUniqueInstance - Race condition can cause a use-after-free bug

Reading through the code, I found what looks like a race condition which can cause a "use-after-free".

When TUniqueInstance is destroyed, FThread is asked to terminate and FSocket is freed:
https://github.com/sysrpl/Codebot.Cross/blob/master/source/codebot/codebot.unique.pas#L77-L79

But the FThread can still be running and attempt to access FSocket after it is freed.
https://github.com/sysrpl/Codebot.Cross/blob/master/source/codebot/codebot.unique.pas#L99

(Imagine the thread checks Terminated and a context switch happens right after that. The main thread then calls TUniqueInstance.Destroy and FSocket is freed. When the thread continues to execute it calls FSocket.Accept(Client), but FSocket has already been freed.)

Forward declaration errors on compiling with Cross.Codebot

Compile package codebot 1.0: Exit code 1, Errors: 3
codebot.forms.management.pas(24,20) Error: Forward declaration not solved "class GetCurrent:TCustomForm; Static;"
codebot.forms.management.pas(25,20) Error: Forward declaration not solved "class GetDefaultFont:TFont; Static;"
codebot.forms.management.pas(27,21) Error: Forward declaration not solved "class Activate(TCustomForm); Static;"

Tested with a blank form and with several examples.
Windows 10 x64, FPC3/Lazarus from getlazarus.com!

Help for Direct2D

on Lazarus forum I saw post that Codebot Cross can help to use Direct2D.
I need to add D2D mode to CudaText app which paints on Canvas.
It is ATSynEdit component which paints on TWinControl.Canvas in Paint method. Can your code help to add D2D mode?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.