BCB-Tools.com

Home of
RAD DirectX

C++ Builder wrapping DirectX

...

Please Register

So we can
create more

the TDx_Library
the TDx9_Library



Welcome to BCB-Tools.com Latest News

Development Tools Demo Applications Step-by-Step Tutorials Component Reference

Register Here! Available Downloads

Frequently Asked Questions Discussion Forums Receive emails from BCB-Tools.com Send us some Feedback

Links to other sites Information about the BCB-Tools.com website


    TDx_Draw_Library v1.90 Component Reference

    -= Click to navigate the reference =-

    -= Go to the TDx_Draw description =-   Component: TDX_DRAW::CREATEPALETTE()

    Go to the Welcome Page
    [ TDx_Draw ]     [ next: CreateSurface() ]     [ prev: CreateClipper() ]

    public:
         virtual bool __fastcall CreatePalette( dword pFlags, PALETTEENTRY* pColorArray, TDx_DrawPalette* pPalette );

    If you would like to submit additions or improvements to this page, click: admin@bcb-tools.com.


    DESCRIPTION

    Top     Parameters     See Also

    The TDx_Draw::CreatePalette method will create a palette to be used by the TDx_Draw component calling this method.

    If the method call fails, the OnError event will be triggered with one of the following values:
    DDERR_INVALIDOBJECT
    DDERR_INVALIDPARAMS
    DDERR_NOCOOPERATIVELEVELSET
    DDERR_OUTOFMEMORY
    DDERR_UNSUPPORTED




    PARAMETERS

    Top     See Also

      Flags
      The Flags parameter defines flags indicating the type of index used to access the created palette's color table.
      The described effect applies when the flag is set.

        DDPCAPS_1BIT
        The palette index will be 1 bit.
        There will be 2 entries in the color table.

        DDPCAPS_2BIT
        The palette index will be 2 bits.
        There will be 4 entries in the color table.

        DDPCAPS_4BIT
        The palette index will be 4 bits.
        There will be 16 entries in the color table.

        DDPCAPS_8BIT
        The palette index will be 8 bits.
        There will be 256 entries in the color table.

        DDPCAPS_8BITENTRIES
        The palette index will reference an 8 bit color index.
        This flag is only valid when one of the DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT flags are set and the surface which is to use the new palette has a bit depth of 8.
        Each color entry is an 8 bit index into the destination surface's 8 bpp palette.

        DDPCAPS_ALLOW256
        All 256 entries of the created palette may be accessed.
        Entry 0 and entry 255 on 8-bit palettes are reserved for system use unless this flag is set.

        DDPCAPS_ALPHA
        The peFlags member of the associated PALETTEENTRY structure is to be interpreted as an 8-bit alpha value.
        Palettes with this capability may only be attached to textures.

        DDPCAPS_INITIALIZE
        The palette is to be initialized with the colors referenced by the ColorArray parameter of this method.

        DDPCAPS_PRIMARYSURFACE
        The palette is attached to the primary surface.
        Changes to the palette will have an immediate effect on the display unless the DDPCAPS_VSYNC capability is specified and supported.

        DDPCAPS_PRIMARYSURFACELEFT
        The palette is attached to the primary surface for the left eye.
        Changes to the palette will have an immediate effect on the left eye display unless the DDPCAPS_VSYNC capability is specified and supported.

        DDPCAPS_VSYNC
        The palette can be modified synchronously with the monitor's refresh rate.

      ColorArray
      The ColorArray parameter references an array of 2, 4, 16, or 256 PALETTEENTRY structures used to initialize the palette being created.

      Palette
      The Palette parameter will reference the new palette if this method returns successfully.





    SEE ALSO

    Top     Parameters






























Top

Welcome |  Latest News |  Tools |  Demos |  Tutorials |  Reference |  Register |  Downloads
FAQ |  Forums |  Feedback |  Mailing List |  Links |  Site Information

This page is Copyright © 2008 Darren John Dwyer, Australia. All Rights Reserved.
Borland C++ Builder, CBuilder, etc are Trademarks of Borland Corporation.
DirectX, DirectDraw, Windows, etc are Trademarks of Microsoft Corporation.