xj qian
2024-06-25 58c129e8f21f79396a822eaeadd78edf281b52a0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once
 
#include "win32/win.hpp"
#include "wobject/xcontrol.hpp"
#include "kobject/kimage.hpp"
 
using kimage = Hxsoft::XFrame::IXImage;
class ximage:  public xcontrol
{
public:
    ximage() :xcontrol(nullptr) {}
    ximage(void* impl) :xcontrol(impl) {}
public:
    kimage GetKImage(){
        return (kimage*)getNativePointer();
    }
public:
    int GetWidth()
    {
        return GetKImage()->GetWidth();
    }
    int GetHeight()
    {
        return GetKImage()->GetHeight();
    }
public:
    LPCTSTR  SetUrl(LPCTSTR pServer,LPCTSTR pUrl)
    {
        return GetKImage()->SetUrl(pServer,pUrl);
    }
    LPCTSTR  GetUrl()
    {
        return GetKImage()->GetUrl();
    }
    LPCTSTR  GetServerUrl()
    {
        return GetKImage()->GetServerUrl();
    }
public:
    bool SaveToFile()
    {
        return GetKImage()->SaveToFile();
    }
    bool SaveToFile(LPTSTR pFile)
    {
        return GetKImage()->SaveToFile(pFile);
    }
    bool SaveToFileEx(LPTSTR pFile)
    {
        return GetKImage()->SaveToFileEx(pFile);
    }
    bool LoadFromUrl(LPCTSTR pServerUrl,LPCTSTR pUrl)
    {
        return GetKImage()->LoadFromUrl(pServerUrl,pUrl);
    }
};