/kernel/trunk/docs/sysfuncr.txt |
---|
2512,6 → 2512,16 |
* eax = если успешно - указатель на область памяти с данными |
* eax = 1 - ошибка |
* eax = -1 - отсутствует область главного списка |
Замечания: |
* буфер, на который указывает eax, содержит следующую информацию: |
* +0: dword: общая длина данных |
* +4: dword: определяет тип данныx: |
* 0 = Текст |
* 1 = Текст с блочным выделением |
* 2 = Изображение |
* 3 = RAW |
* 4 и выше зарезервировано |
* +8: более детально смотрите файл clipboard_container_rus.txt |
---------------------- Константы для регистров: ---------------------- |
eax - SF_CLIPBOARD (54) |
/programs/media/animage/trunk/animage.asm |
---|
313,6 → 313,8 |
used_OldY rd 1 |
rectangular_shade_x rd 1 ;ª®®à¤¨ â x ®¡« á⨠¤«ï ª®¯¨à®¢ ¨ï |
rectangular_shade_y rd 1 |
paste_img_w rd 1 ;è¨à¨ ¢áâ ¢«ï¥¬®£® ¨§®¡à ¦¥¨ï |
paste_img_h rd 1 ;¢ëá®â ¢áâ ¢«ï¥¬®£® ¨§®¡à ¦¥¨ï |
crossing_old_x rd 1 |
crossing_old_y rd 1 |
crossing rd 1 |
/programs/media/animage/trunk/events_of_window.inc |
---|
75,12 → 75,12 |
mov edx, 0xD5CDCB |
mcall 13 |
mov eax,ci_panel_x_pos |
mov ebx,ci_panel_y_pos |
mov ecx,[Window_SizeX] |
mov edx,50 |
mov esi,1 |
sub ecx,5+ci_panel_x_pos+ci_offs_skin_w |
;mov eax,ci_panel_x_pos |
;mov ebx,ci_panel_y_pos |
;mov ecx,[Window_SizeX] |
;mov edx,50 |
;mov esi,1 |
;sub ecx,5+ci_panel_x_pos+ci_offs_skin_w |
call draw_icons |
call PrintMousePos |
;------------------------------------------------ |
/programs/media/animage/trunk/icons.inc |
---|
82,7 → 82,7 |
;buttons of zoom |
and [counter],0 |
mov [Icon_X],ci_panel_x_pos+159 |
mov [Icon_X],ci_panel_x_pos+178 |
next_button_zoom: |
/programs/media/animage/trunk/menu_instruments.inc |
---|
313,6 → 313,14 |
sub ebx,edi |
mov edx,[PointerToEditBufer] |
mov eax,[rectangular_shade_x] |
sub eax,[OldX] |
mov [edx],eax ;image.w |
mov eax,[rectangular_shade_y] |
sub eax,[OldY] |
mov [edx+4],eax ;image.h |
mov dword[edx+8],24 ;bit in pixel |
add edx,12 ;copy image parametrs |
mov [y],edi |
loop_fill_rectangle_y_copy: |
345,6 → 353,9 |
cmp eax,[rectangular_shade_y] |
jl loop_fill_rectangle_y_copy |
;...todo use system buffer... |
;mcall SF_CLIPBOARD,SSF_WRITE_CB,,[PointerToEditBufer] |
call MovePictureToWorkScreen |
mov [DrawSprite_flag],1 |
jmp end_menu |
408,6 → 419,15 |
no_signum_fill_r_y_paste: |
mov edx,[PointerToEditBufer] |
cmp dword[edx+8],24 |
jne end_menu |
mov eax,[edx] |
add eax,[OldX] |
mov [paste_img_w],eax |
mov eax,[edx+4] |
add eax,[OldY] |
mov [paste_img_h],eax |
add edx,12 ;copy image parametrs |
mov [y],edi |
loop_fill_rectangle_y_paste: |
428,15 → 448,21 |
mov eax,[x] |
add eax,[Dx_] |
cmp eax,[paste_img_w] |
je no_paste_data_x |
mov [x],eax |
cmp eax,[rectangular_shade_x] |
jl loop_fill_rectangle_x_paste |
no_paste_data_x: |
mov eax,[y] |
add eax,[Dy_] |
cmp eax,[paste_img_h] |
je no_paste_data_y |
mov [y],eax |
cmp eax,[rectangular_shade_y] |
jl loop_fill_rectangle_y_paste |
no_paste_data_y: |
call MovePictureToWorkScreen |
mov [Paste_flag],1 |
/programs/media/animage/trunk/sprites.inc |
---|
1,12 → 1,21 |
;----------------------------------------------------------- |
;------------------SaveFonForSprite------------------------- |
;SaveFonForSprite: |
; PointerToPicture -> PointerToSpriteBufer |
; |
;PutFonForSprite: |
; PointerToSpriteBufer -> PointerToPicture |
; |
;DrawSprite: |
; PointerToEditBufer -> PointerToPicture |
;----------------------------------------------------------- |
align 4 |
SaveFonForSprite: |
mov edi,[PointerToSpriteBufer] |
mov ecx,[SpriteSizeX] |
or ecx,ecx |
jz .end_f |
mov edx,[Picture_SizeX] |
sub edx,[SpriteSizeX] |
sub edx,ecx |
mov esi,[SpriteCoordinatY] |
imul esi,[Picture_SizeX] |
add esi,[SpriteCoordinatX] |
13,32 → 22,33 |
lea edx,[edx+edx*2] |
lea esi,[esi+esi*2] |
add esi,[PointerToPicture] |
mov edi,[PointerToSpriteBufer] |
mov ebx,[SpriteSizeY] |
mov [counter],ecx |
next_line_sprite_save: |
.next_line_sprite_save: |
mov ecx,[counter] |
next_pixel_sprite_save: |
align 4 |
@@: |
movsw |
movsb |
dec ecx |
jnz next_pixel_sprite_save |
jnz @b |
add esi,edx |
dec ebx |
jnz next_line_sprite_save |
jnz .next_line_sprite_save |
.end_f: |
ret |
;----------------------------------------------------------- |
;-------------------PutFonForSprite------------------------- |
;----------------------------------------------------------- |
align 4 |
PutFonForSprite: |
mov esi,[PointerToSpriteBufer] |
mov ecx,[SpriteSizeX] |
or ecx,ecx |
jz .end_f |
mov edx,[Picture_SizeX] |
sub edx,[SpriteSizeX] |
sub edx,ecx |
mov edi,[SpriteOldCoordinatY] |
imul edi,[Picture_SizeX] |
add edi,[SpriteOldCoordinatX] |
45,32 → 55,33 |
lea edx,[edx+edx*2] |
lea edi,[edi+edi*2] |
add edi,[PointerToPicture] |
mov esi,[PointerToSpriteBufer] |
mov ebx,[SpriteSizeY] |
mov [counter],ecx |
next_line_sprite_put: |
.next_line_sprite_put: |
mov ecx,[counter] |
next_pixel_sprite_put: |
align 4 |
@@: |
movsw |
movsb |
dec ecx |
jnz next_pixel_sprite_put |
jnz @b |
add edi,edx |
dec ebx |
jnz next_line_sprite_put |
jnz .next_line_sprite_put |
.end_f: |
ret |
;----------------------------------------------------------- |
;------------------DrawFonForSprite------------------------- |
;----------------------------------------------------------- |
align 4 |
DrawSprite: |
mov esi,[PointerToEditBufer] |
mov ecx,[SpriteSizeX] |
or ecx,ecx |
jz .end_f |
mov edx,[Picture_SizeX] |
sub edx,[SpriteSizeX] |
sub edx,ecx |
mov edi,[SpriteCoordinatY] |
imul edi,[Picture_SizeX] |
add edi,[SpriteCoordinatX] |
77,20 → 88,21 |
lea edx,[edx+edx*2] |
lea edi,[edi+edi*2] |
add edi,[PointerToPicture] |
mov esi,[PointerToEditBufer] |
mov ebx,[SpriteSizeY] |
mov [counter],ecx |
next_line_sprite_draw: |
.next_line_sprite_draw: |
mov ecx,[counter] |
next_pixel_sprite_draw: |
align 4 |
@@: |
movsw |
movsb |
dec ecx |
jnz next_pixel_sprite_draw |
jnz @b |
add edi,edx |
dec ebx |
jnz next_line_sprite_draw |
jnz .next_line_sprite_draw |
.end_f: |
ret |