CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Cambalinho

Page 1 of 54 1 2 3 4

Search: Search took 0.03 seconds.

  1. C++: how calculate the stretch and alpha blend on pixels?

    i have 2 pixels pointers(Destination and Source).
    1 - how can i calculate or get Alpha value on pixel?
    2 - how can i combine the 2 pixels for AlphaBlend?
    3 - how can i calculate for stretch the...
  2. Replies
    3
    Views
    843

    Re: C++: how get line points?

    see these image:
    36026
    https://forums.codeguru.com/image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAAA/CAYAAAAVMKENAAABV0lEQVR4nO3cS26EMBRFQRNl/1smU9pBndDAxZ...
  3. Replies
    3
    Views
    843

    Re: C++: how get line points?

    hello VictorN.. sometime ;)
    1 - the line be printed more clear(mean the perfect line);
    2 - the line is printed using the pixels positions... the positions must be calculated. the 'GetLinePoints()'...
  4. Replies
    3
    Views
    843

    C++: how get line points?

    using the line point origin and destination, we can calculate the line dots between origin and destination:

    #define M_PI 3.14159265358979323846 /* pi */

    struct Position2D
    {
    ...
  5. Replies
    1
    Views
    1,703

    how works perspective?

    how the perspective works?
  6. why i can't create a memory HBitmap and draw it?

    heres how i get the console HDC:

    //getting the HDC Console Window:
    HDC WindowHDC=GetDC(GetConsoleWindow());
    works fine, because the SetPixel() draw the right pixel.
    heres my actual image...
  7. Re: Knowing HDC, can i get the actual DIB, or i must create it?

    thank you VictorN
  8. Re: Knowing HDC, can i get the actual DIB, or i must create it?

    both zero

    Dim s As Long s = GetDIBits(DestinationHDC, DestinationBitmap, 0, bm.bmHeight, gptr, bi, DIB_RGB_COLORS)
    If (s = 0) Then
    MsgBox "error " + vbTab + CStr(GetLastError())
    ...
  9. Re: Knowing HDC, can i get the actual DIB, or i must create it?

    so far i did these code:

    Friend Sub DrawImageRectanglePoints(DestinationHDC As Long, Points() As Position3D, WorldSize As Size3D) 'Points(0) is the Upper-Left
    'Points(1) is the Upper-Right...
  10. Knowing HDC, can i get the actual DIB, or i must create it?

    using the GetCurrentObject() with HDC, i can get the actual HBitmap handle....but i need ask more 2 things:
    1 - how can i get the BITMAPINFOHEADER from HBitmap?
    2 - do i need create the DIB or the...
  11. Replies
    0
    Views
    2,440

    how use DIB's?

    i have these 2 functions for get pixels:

    Public Sub GetImageData(ByRef SourcehBitmap As Long, ByRef SourceHDC As Long, ByRef ImageData() As Byte)

    'Declare variables of the necessary bitmap...
  12. Replies
    1
    Views
    8,060

    Re: how rotate a 2D image using 3D rotation?

    i use these functions for rotate a pixel...
    1 - we get the pixel(the Z is zero) on RotationImage() and GetPixel();
    2 - all angles(X, Y and Z) must be converted in Radians(the computer use Radians...
  13. Replies
    1
    Views
    8,060

    how rotate a 2D image using 3D rotation?

    heres the functions that i use for rotation 3D:

    //RotateImage.h:
    #include <iostream>
    #include <windows.h>
    #include <math.h>


    struct PointAPI
    {
  14. Re: how use UDT(User Defined Types) on a class?

    i can't find that option :(
    PS: if i use a 'private' on UDT's and the function that have that parameters being 'private', i will not get that error... but the function must be used.. so must be...
  15. Re: how use UDT(User Defined Types) on a class?

    ok.. the type is public, but i get, now, an error on type:

    Public Type POINTL X As Long
    Y As Long
    End Type
    "compiler error: cannot define a public user-defined type within a private...
  16. Re: how use UDT(User Defined Types) on a class?

    Public Sub DrawImageTrapezoid(ByRef Points() As POINTL, ByVal DestinationHDC As Long, ByVal TranspColor As Long)
    "Compiler error:
    Private enum and user defined types cannot be used as parameters ou...
  17. Re: how use UDT(User Defined Types) on a class?

    heres the error message:
    https://imgur.com/a/hOjFifj
    and now the 'array parentheses':

    Option Explicit

    Private GDIsi As GDIPlusStartupInput, gToken As Long, hGraphics As Long, hBitmap As Long
  18. how use UDT(User Defined Types) on a class?

    i created a class:

    Option Explicit

    Private GDIsi As GDIPlusStartupInput, gToken As Long, hGraphics As Long, hBitmap As Long


    Private Type POINTL
    X As Long
    Y As Long
  19. Replies
    28
    Views
    6,725

    Re: how use PlgBlt() API function?

    no.... but i'm trying understand if the values from points() to texturepoints() are correct or not :(
    i'm confused... the texture go to the 1st to the 2nd points without problems... i belive the 3...
  20. Replies
    28
    Views
    6,725

    Re: how use PlgBlt() API function?

    wow i found 1 problem: if the point have a negative value, i will get big numbers... ok these problem will be fixed. after i learn 1 math.
    heres the values:
    35907
    but what i did wrong with values?
  21. Replies
    28
    Views
    6,725

    Re: how use PlgBlt() API function?

    VictorN: even not be C code... what you think about the image?
    heres a pseud-rectangle(A to D):
    B |-----------|C

    A |-----------| D
    "A pointer to an array of three points in logical space that...
  22. Replies
    28
    Views
    6,725

    Re: how use PlgBlt() API function?

    finally i'm using it, but i'm getting the wrong shape width..

    'Get the four vectors
    'Floor:
    'Vector1: low-left
    FillPosition3D NewPosition3D(0), Position.X, Position.Y,...
  23. Replies
    28
    Views
    6,725

    Re: how use PlgBlt() API function?

    correct me anotherthing: even if i fix it, the PlgBlt() can be used on a plane? or the results will be not what we expected?
    i mean drawed the texture.. like create a street
  24. Replies
    28
    Views
    6,725

    Re: how use PlgBlt() API function?

    PlgBlt Me.hDC, points2, Picture1.hDC, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, &O0, &O0, &O0
    error by ref argument....
  25. Replies
    0
    Views
    643

    how use\add GDIPLUS on VB6?

    how use\add GDIPLUS on VB6?
Results 1 to 25 of 1335
Page 1 of 54 1 2 3 4





Click Here to Expand Forum to Full Width

Featured