width = gdk_pixbuf_animation_get_width(ani)
height = gdk_pixbuf_animation_get_height(ani)
current_frame_list = gdk_pixbuf_animation_get_frames(ani)
pixmap = gdk_pixmap_new(w->window, width, height, -1)
clean_pixmap = gdk_pixmap_new(w->window, width, height, -1)
if (w->style->bg_pixmap[GTK_STATE_NORMAL]) {
GdkPixmap *bg = w->style->bg_pixmap[GTK_STATE_NORMAL]
GdkGC *gc
GdkGCValues values
values.tile = bg
values.fill = GDK_TILED
gc = gdk_gc_new_with_values(w->window, &values,
GDK_GC_FILL|GDK_GC_TILE)
gdk_gc_set_ts_origin(gc,
(w->allocation.width - width)/2,
(w->allocation.height-height)/2)
gdk_draw_rectangle(clean_pixmap,gc, TRUE,
0, 0, width, height)
gdk_gc_destroy(gc)
} else {
gdk_draw_rectangle(clean_pixmap,
w->style->bg_gc[GTK_STATE_NORMAL],
TRUE, 0, 0, width, height)
}
標簽:
gdk_pixbuf_animation_get_height
gdk_pixbuf_animation_get_width
ani
height
上傳時間:
2013-12-26
上傳用戶:thinode
Two scripts are included here.
1. convsys.m - combines the state space representation of two systems connected in series.
[Ao,Bo,Co,Do]=convsys(A1,B1,C1,D1,A2,B2,C2,D2)
This algorithm gives the convolution of two state space representations
| A1 B1 | | A2 B2 |
u ==> | | ==> | | ==> y
| C1 D1 | | C2 D2 |
The algorithm also accepts state space objects as inputs and gives out a state space object as output.
2. sysfeedbk.m
[Ao,Bo,Co,Do]=convsys(A1,B1,C1,D1,A2,B2,C2,D2)
Gives the closed loop state space representation for two systems connected with negative feedback in the following manner.
| A1 B1 |
u ==> | | ==> y
+ o | C1 D1 | |
- | |
| | A2 B2 | |
|= | |= |
| C2 D2 |
The zip file also contains checkcompatibility.m , which checks the compatibility of matrix dimensions in the system and cleanss.m which can be used to clean a state space representation.
標簽:
representation
included
combines
scripts
上傳時間:
2017-07-25
上傳用戶:semi1981