Procházet zdrojové kódy

added bgra_pascalscript_library (bgrabitmap.dll)

lainz před 11 roky
rodič
revize
a5dc221b10

+ 136 - 0
bgra_pascalscript_library/bgra_pascalscript_library.lpi

@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+  <ProjectOptions>
+    <Version Value="9"/>
+    <PathDelim Value="\"/>
+    <General>
+      <Flags>
+        <MainUnitHasCreateFormStatements Value="False"/>
+        <MainUnitHasTitleStatement Value="False"/>
+      </Flags>
+      <SessionStorage Value="InProjectDir"/>
+      <MainUnit Value="0"/>
+      <Title Value="bgra_pascalscript_library"/>
+      <UseAppBundle Value="False"/>
+      <ResourceType Value="res"/>
+    </General>
+    <i18n>
+      <EnableI18N LFM="False"/>
+    </i18n>
+    <VersionInfo>
+      <StringTable ProductVersion=""/>
+    </VersionInfo>
+    <BuildModes Count="2">
+      <Item1 Name="Release" Default="True"/>
+      <Item2 Name="Debug">
+        <CompilerOptions>
+          <Version Value="11"/>
+          <PathDelim Value="\"/>
+          <Target>
+            <Filename Value="bgrabitmap"/>
+          </Target>
+          <SearchPaths>
+            <IncludeFiles Value="$(ProjOutDir)"/>
+            <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
+          </SearchPaths>
+          <Parsing>
+            <SyntaxOptions>
+              <IncludeAssertionCode Value="True"/>
+            </SyntaxOptions>
+          </Parsing>
+          <CodeGeneration>
+            <RelocatableUnit Value="True"/>
+            <Checks>
+              <IOChecks Value="True"/>
+              <RangeChecks Value="True"/>
+              <OverflowChecks Value="True"/>
+              <StackChecks Value="True"/>
+            </Checks>
+          </CodeGeneration>
+          <Linking>
+            <Debugging>
+              <DebugInfoType Value="dsDwarf2Set"/>
+              <UseHeaptrc Value="True"/>
+              <UseExternalDbgSyms Value="True"/>
+            </Debugging>
+            <Options>
+              <ExecutableType Value="Library"/>
+            </Options>
+          </Linking>
+          <Other>
+            <CompilerMessages>
+              <MsgFileName Value=""/>
+            </CompilerMessages>
+            <CompilerPath Value="$(CompPath)"/>
+          </Other>
+        </CompilerOptions>
+      </Item2>
+    </BuildModes>
+    <PublishOptions>
+      <Version Value="2"/>
+    </PublishOptions>
+    <RunParams>
+      <local>
+        <FormatVersion Value="1"/>
+      </local>
+    </RunParams>
+    <RequiredPackages Count="1">
+      <Item1>
+        <PackageName Value="bgracontrols"/>
+      </Item1>
+    </RequiredPackages>
+    <Units Count="1">
+      <Unit0>
+        <Filename Value="bgra_pascalscript_library.lpr"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="bgra_pascalscript_library"/>
+      </Unit0>
+    </Units>
+  </ProjectOptions>
+  <CompilerOptions>
+    <Version Value="11"/>
+    <PathDelim Value="\"/>
+    <Target>
+      <Filename Value="bgrabitmap"/>
+    </Target>
+    <SearchPaths>
+      <IncludeFiles Value="$(ProjOutDir)"/>
+      <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
+    </SearchPaths>
+    <CodeGeneration>
+      <SmartLinkUnit Value="True"/>
+      <RelocatableUnit Value="True"/>
+      <Optimizations>
+        <OptimizationLevel Value="3"/>
+      </Optimizations>
+    </CodeGeneration>
+    <Linking>
+      <Debugging>
+        <GenerateDebugInfo Value="False"/>
+      </Debugging>
+      <LinkSmart Value="True"/>
+      <Options>
+        <ExecutableType Value="Library"/>
+      </Options>
+    </Linking>
+    <Other>
+      <CompilerMessages>
+        <MsgFileName Value=""/>
+      </CompilerMessages>
+      <CompilerPath Value="$(CompPath)"/>
+    </Other>
+  </CompilerOptions>
+  <Debugging>
+    <Exceptions Count="3">
+      <Item1>
+        <Name Value="EAbort"/>
+      </Item1>
+      <Item2>
+        <Name Value="ECodetoolError"/>
+      </Item2>
+      <Item3>
+        <Name Value="EFOpenError"/>
+      </Item3>
+    </Exceptions>
+  </Debugging>
+</CONFIG>

+ 114 - 0
bgra_pascalscript_library/bgra_pascalscript_library.lpr

@@ -0,0 +1,114 @@
+library bgra_pascalscript_library;
+
+{$mode objfpc}{$H+}
+
+uses
+  Interfaces, BGRAPascalScript;
+
+  function rgb(red, green, blue: byte): TBGRAColor; stdcall;
+  begin
+    result := BGRAPascalScript.rgb(red, green, blue);
+  end;
+
+  function rgba(red, green, blue, alpha: byte): TBGRAColor; stdcall;
+  begin
+    Result := BGRAPascalScript.rgba(red, green, blue, alpha);
+  end;
+
+  function getBlue(AColor: TBGRAColor): byte; stdcall;
+  begin
+    Result := BGRAPascalScript.getBlue(aColor);
+  end;
+
+  function getGreen(AColor: TBGRAColor): byte; stdcall;
+  begin
+    Result := BGRAPascalScript.getGreen(AColor);
+  end;
+
+  function getRed(AColor: TBGRAColor): byte; stdcall;
+  begin
+    Result := BGRAPascalScript.getRed(AColor);
+  end;
+
+  function getAlpha(AColor: TBGRAColor): byte; stdcall;
+  begin
+    Result := BGRAPascalScript.getAlpha(AColor);
+  end;
+
+  function setBlue(AColor: TBGRAColor; AValue: byte): TBGRAColor; stdcall;
+  begin
+    Result := BGRAPascalScript.setBlue(AColor, AValue);
+  end;
+
+  function setGreen(AColor: TBGRAColor; AValue: byte): TBGRAColor; stdcall;
+  begin
+    Result := BGRAPascalScript.setGreen(AColor, AValue);
+  end;
+
+  function setRed(AColor: TBGRAColor; AValue: byte): TBGRAColor; stdcall;
+  begin
+    Result := BGRAPascalScript.setRed(AColor, AValue);
+  end;
+
+  function setAlpha(AColor: TBGRAColor; AValue: byte): TBGRAColor; stdcall;
+  begin
+    Result := BGRAPascalScript.setAlpha(AColor, AValue);
+  end;
+
+  {Constructors}
+  procedure bgra_Create(id: integer); stdcall;
+  begin
+    BGRAPascalScript.bgra_Create(id);
+  end;
+
+  procedure bgra_CreateWithSize(id: integer; AWidth, AHeight: integer); stdcall;
+  begin
+    BGRAPascalScript.bgra_CreateWithSize(id, AWidth, AHeight);
+  end;
+
+  procedure bgra_Fill(id: integer; AColor: TBGRAColor); stdcall;
+  begin
+    BGRAPascalScript.bgra_Fill(id, AColor);
+  end;
+
+  procedure bgra_SetPixel(id: integer; x, y: integer; AColor: TBGRAColor); stdcall;
+  begin
+    BGRAPascalScript.bgra_SetPixel(id, x, y, AColor);
+  end;
+
+  function bgra_GetPixel(id: integer; x, y: integer): TBGRAColor; stdcall;
+  begin
+    Result := BGRAPascalScript.bgra_GetPixel(id, x, y);
+  end;
+
+  procedure bgra_CreateFromFile(id: integer; AFilename: string); stdcall;
+  begin
+    BGRAPascalScript.bgra_CreateFromFile(id, AFilename);
+  end;
+
+  procedure bgra_Destroy(id: integer); stdcall;
+  begin
+    BGRAPascalScript.bgra_Destroy(id);
+  end;
+
+exports
+  rgb,
+  rgba,
+  getBlue,
+  getGreen,
+  getRed,
+  getAlpha,
+  setBlue,
+  setGreen,
+  setRed,
+  setAlpha,
+  bgra_Create,
+  bgra_CreateWithSize,
+  bgra_Fill,
+  bgra_SetPixel,
+  bgra_GetPixel,
+  bgra_CreateFromFile,
+  bgra_Destroy;
+
+begin
+end.