本文整理汇总了C++中ebox_invalidate_layer函数的典型用法代码示例。如果您正苦于以下问题:C++ ebox_invalidate_layer函数的具体用法?C++ ebox_invalidate_layer怎么用?C++ ebox_invalidate_layer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ebox_invalidate_layer函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: tab_notify
static t_pd_err tab_notify(t_tab *x, t_symbol *s, t_symbol *msg, void *sender, void *data)
{
if (msg == cream_sym_attr_modified)
{
if(s == cream_sym_bgcolor ||
s == cream_sym_bdcolor ||
s == cream_sym_textcolor ||
s == cream_sym_hocolor ||
s == cream_sym_secolor ||
s == cream_sym_orientation ||
s == cream_sym_font)
{
ebox_invalidate_layer((t_ebox *)x, cream_sym_selection_layer);
ebox_invalidate_layer((t_ebox *)x, cream_sym_text_layer);
ebox_invalidate_layer((t_ebox *)x, cream_sym_background_layer);
}
else if(s == cream_sym_orientation ||
s == cream_sym_items)
{
ebox_notify((t_ebox *)x, s_cream_size, cream_sym_attr_modified, NULL, NULL);
}
}
else if(msg == cream_sym_value_changed)
{
tab_output(x);
ebox_invalidate_layer((t_ebox *)x, cream_sym_background_layer);
ebox_redraw((t_ebox *)x);
}
return 0;
}
开发者ID:EQ4,项目名称:CreamLibrary,代码行数:30,代码来源:c.tab.cpp
示例2: tab_set
static void tab_set(t_tab *x, t_symbol *s, int argc, t_atom *argv)
{
int i;
t_symbol* item;
if(argc && argv && atom_gettype(argv) == A_FLOAT)
{
ebox_parameter_setvalue((t_ebox *)x, 1, atom_getfloat(argv), 0);
ebox_invalidate_layer((t_ebox *)x, cream_sym_background_layer);
ebox_redraw((t_ebox *)x);
}
else if(argc && argv && atom_gettype(argv) == A_SYMBOL)
{
item = tab_gensym(NULL, argc, argv);
if(item)
{
for(i = 0; i < x->f_nitems; i++)
{
if(x->f_items[i] == item)
{
ebox_parameter_setvalue((t_ebox *)x, 1, (float)i, 0);
ebox_invalidate_layer((t_ebox *)x, cream_sym_background_layer);
ebox_redraw((t_ebox *)x);
return;
}
}
}
}
}
开发者ID:EQ4,项目名称:CreamLibrary,代码行数:28,代码来源:c.tab.cpp
示例3: angles_set
t_pd_err angles_set(t_hoa_meter *x, void *attr, long argc, t_atom *argv)
{
double angles[MAX_SPEAKER];
if(argc > MAX_SPEAKER)
argc = MAX_SPEAKER;
if(argc && argv)
{
for(int i = 0; i < argc; i++)
{
if(atom_gettype(argv+i) == A_FLOAT)
{
angles[i] = atom_getfloat(argv+i) / 360. * HOA_2PI;
}
}
x->f_meter->setChannelsAzimuth(angles);
x->f_vector->setChannelsAzimuth(angles);
}
ebox_invalidate_layer((t_ebox *)x, hoa_sym_background_layer);
ebox_invalidate_layer((t_ebox *)x, hoa_sym_leds_layer);
ebox_invalidate_layer((t_ebox *)x, hoa_sym_vector_layer);
ebox_redraw((t_ebox *)x);
return 0;
}
开发者ID:sfm1234,项目名称:HoaLibrary,代码行数:25,代码来源:hoa.2d.meter_gui_tilde.cpp
示例4: hoa_meter_tick
void hoa_meter_tick(t_hoa_meter *x)
{
if(x->f_vector_type == hoa_sym_both)
x->f_vector->process(x->f_signals, x->f_vector_coords);
else if(x->f_vector_type == hoa_sym_velocity)
x->f_vector->processVelocity(x->f_signals, x->f_vector_coords);
else if(x->f_vector_type == hoa_sym_energy)
x->f_vector->processEnergy(x->f_signals, x->f_vector_coords + 2);
double peak;
for (int i = 0; i < x->f_meter->getNumberOfChannels(); i++)
{
peak = x->f_meter->getChannelEnergy(i);
if(peak >= 0.)
x->f_over_leds[i] = 1000;
else
x->f_over_leds[i] -= x->f_interval;
if(x->f_over_leds[i] < 0)
x->f_over_leds[i] = 0;
}
ebox_invalidate_layer((t_ebox *)x, hoa_sym_leds_layer);
ebox_invalidate_layer((t_ebox *)x, hoa_sym_vector_layer);
ebox_redraw((t_ebox *)x);
if (sys_getdspstate())
clock_delay(x->f_clock, x->f_interval);
}
开发者ID:sfm1234,项目名称:HoaLibrary,代码行数:29,代码来源:hoa.2d.meter_gui_tilde.cpp
示例5: breakpoints_mousemove
void breakpoints_mousemove(t_breakpoints *x, t_object *patcherview, t_pt pt, long modifiers)
{
int i;
float abs, ord;
float height = sys_fontheight(ebox_getfontsize((t_ebox *)x)) + 2;
float distx = (3. / (x->f_size.x - 4.)) * (x->f_range_abscissa[1] - x->f_range_abscissa[0]);
float disty = (3. / (x->f_size.y - 4. - height)) * (x->f_range_ordinate[1] - x->f_range_ordinate[0]);
abs = ((pt.x - 3.) / (x->f_size.x - 4.)) * (x->f_range_abscissa[1] - x->f_range_abscissa[0]) + x->f_range_abscissa[0];
ord = ((x->f_size.y - (pt.y - 4.) - 4.) / (x->f_size.y - 4. - height)) * (x->f_range_ordinate[1] - x->f_range_ordinate[0]) + x->f_range_ordinate[0];
x->f_point_hover = -1;
x->f_mouse.x = abs;
x->f_mouse.y = ord;
for(i = 0; i < x->f_number_of_points; i++)
{
if(abs > x->f_point_abscissa[i] - distx && abs < x->f_point_abscissa[i] + distx && ord > x->f_point_ordinate[i] - disty && ord < x->f_point_ordinate[i] + disty)
{
x->f_point_hover = i;
}
}
ebox_invalidate_layer((t_ebox *)x, gensym("points_layer"));
ebox_invalidate_layer((t_ebox *)x, cream_sym_text_layer);
ebox_redraw((t_ebox *)x);
}
开发者ID:avilleret,项目名称:CreamLibrary,代码行数:25,代码来源:c.breakpoints.cpp
示例6: carray_output
void carray_output(t_carray *x, t_symbol* s, long argc, t_atom* argv)
{
post("Array : %s, Size : %i", x->f_name->s_name, x->f_buffer_size);
ebox_invalidate_layer((t_ebox*)x, gensym("buffer_layer"));
ebox_invalidate_layer((t_ebox *)x, gensym("background_layer"));
ebox_redraw((t_ebox *)x);
}
开发者ID:rvega,项目名称:CicmWrapper,代码行数:7,代码来源:c.array.cpp
示例7: tab_mouseup
static void tab_mouseup(t_tab *x, t_object *patcherview, t_pt pt, long modifiers)
{
if(!x->f_toggle)
{
x->f_off = 1;
ebox_invalidate_layer((t_ebox *)x, cream_sym_selection_layer);
ebox_invalidate_layer((t_ebox *)x, cream_sym_text_layer);
ebox_redraw((t_ebox *)x);
}
}
开发者ID:EQ4,项目名称:CreamLibrary,代码行数:10,代码来源:c.tab.cpp
示例8: knob_mousedrag
static void knob_mousedrag(t_knob *x, t_object *patcherview, t_pt pt, long modifiers)
{
t_rect rect;
ebox_get_rect_for_view((t_ebox *)x, &rect);
if(x->f_circular)
{
const float size = rect.width * 0.5f;
const float angle = pd_angle(pt.x - size, -(size - pt.y));
if(x->f_endless)
{
const float value = pd_wrap((angle - EPD_PI2) / EPD_2PI, 0.f, 1.f);
if(ebox_parameter_isinverted((t_ebox *)x, 1))
{
ebox_parameter_setvalue_normalized((t_ebox *)x, 1, 1.f - value, 1);
}
else
{
ebox_parameter_setvalue_normalized((t_ebox *)x, 1, value, 1);
}
}
else
{
const float value = (pd_clip(pd_wrap((angle - EPD_PI2) / EPD_2PI, 0.f, 1.f), 0.125f, 0.875f) - 0.125f) / 0.75f;
if(ebox_parameter_isinverted((t_ebox *)x, 1))
{
ebox_parameter_setvalue_normalized((t_ebox *)x, 1, 1.f - value, 1);
}
else
{
ebox_parameter_setvalue_normalized((t_ebox *)x, 1, value, 1);
}
}
knob_output(x);
ebox_invalidate_layer((t_ebox *)x, cream_sym_needle_layer);
ebox_redraw((t_ebox *)x);
}
else
{
const float current = ebox_parameter_getvalue_normalized((t_ebox *)x, 1);
const float diff = (x->f_reference - pt.y) / (rect.width) * (ebox_parameter_isinverted((t_ebox *)x, 1) ? -1.f : 1.f);
if(x->f_endless)
{
ebox_parameter_setvalue_normalized((t_ebox *)x, 1, pd_wrap(current + diff, 0.f, 1.f), 1);
}
else
{
ebox_parameter_setvalue_normalized((t_ebox *)x, 1, pd_clip(current + diff, 0.f, 1.f), 1);
}
x->f_reference = pt.y;
}
knob_output(x);
ebox_invalidate_layer((t_ebox *)x, cream_sym_needle_layer);
ebox_redraw((t_ebox *)x);
}
开发者ID:EQ4,项目名称:CreamLibrary,代码行数:55,代码来源:c.knob.cpp
示例9: hoa_meter_notify
t_pd_err hoa_meter_notify(t_hoa_meter *x, t_symbol *s, t_symbol *msg, void *sender, void *data)
{
if (msg == gensym("attr_modified"))
{
ebox_invalidate_layer((t_ebox *)x, hoa_sym_background_layer);
ebox_invalidate_layer((t_ebox *)x, hoa_sym_leds_layer);
ebox_invalidate_layer((t_ebox *)x, hoa_sym_vector_layer);
ebox_redraw((t_ebox *)x);
}
return 0;
}
开发者ID:sfm1234,项目名称:HoaLibrary,代码行数:11,代码来源:hoa.2d.meter_gui_tilde.cpp
示例10: breakpoints_mouseleave
void breakpoints_mouseleave(t_breakpoints *x, t_object *patcherview, t_pt pt, long modifiers)
{
x->f_point_selected = -1;
x->f_point_hover = -1;
x->f_mouse.x = -666666;
x->f_mouse.y = -666666;
ebox_invalidate_layer((t_ebox *)x, cream_sym_text_layer);
ebox_invalidate_layer((t_ebox *)x, gensym("points_layer"));
ebox_redraw((t_ebox *)x);
}
开发者ID:avilleret,项目名称:CreamLibrary,代码行数:11,代码来源:c.breakpoints.cpp
示例11: knob_notify
t_pd_err knob_notify(t_knob *x, t_symbol *s, t_symbol *msg, void *sender, void *data)
{
if (msg == cream_sym_attr_modified)
{
if(s == cream_sym_bgcolor || s == cream_sym_bdcolor || s == gensym("necolor") || s == gensym("endless"))
{
ebox_invalidate_layer((t_ebox *)x, gensym("needle_layer"));
ebox_invalidate_layer((t_ebox *)x, cream_sym_background_layer);
}
ebox_redraw((t_ebox *)x);
}
return 0;
}
开发者ID:avilleret,项目名称:CreamLibrary,代码行数:13,代码来源:c.knob.cpp
示例12: gain_notify
t_pd_err gain_notify(t_gain *x, t_symbol *s, t_symbol *msg, void *sender, void *data)
{
if (msg == gensym("attr_modified"))
{
if(s == gensym("bgcolor") || s == gensym("bdcolor") || s == gensym("kncolor"))
{
ebox_invalidate_layer((t_ebox *)x, gensym("knob_layer"));
ebox_invalidate_layer((t_ebox *)x, gensym("background_layer"));
}
ebox_redraw((t_ebox *)x);
}
return 0;
}
开发者ID:rvega,项目名称:CicmWrapper,代码行数:13,代码来源:c.gain~.cpp
示例13: offset_set
t_pd_err offset_set(t_hoa_meter *x, void *attr, long argc, t_atom *argv)
{
if(argc && argv && atom_gettype(argv) == A_FLOAT)
{
x->f_vector->setChannelsOffset(atom_getfloat(argv) / 360 * HOA_2PI);
x->f_meter->setChannelsOffset(atom_getfloat(argv) / 360 * HOA_2PI);
}
ebox_invalidate_layer((t_ebox *)x, hoa_sym_background_layer);
ebox_invalidate_layer((t_ebox *)x, hoa_sym_leds_layer);
ebox_invalidate_layer((t_ebox *)x, hoa_sym_vector_layer);
ebox_redraw((t_ebox *)x);
return 0;
}
开发者ID:sfm1234,项目名称:HoaLibrary,代码行数:15,代码来源:hoa.2d.meter_gui_tilde.cpp
示例14: plane_float
static void plane_float(t_plane *x, float f)
{
ebox_parameter_setvalue((t_ebox *)x, 1, f, eobj_getproxy(x) + 1);
plane_output(x);
ebox_invalidate_layer((t_ebox *)x, cream_sym_points_layer);
ebox_redraw((t_ebox *)x);
}
开发者ID:EQ4,项目名称:CreamLibrary,代码行数:7,代码来源:c.plane.cpp
示例15: radio_set
void radio_set(t_radio *x, t_symbol* s, long argc, t_atom* argv)
{
int i;
if(argc && argv)
{
if(x->f_mode)
{
for(i = 0; i < argc && i < x->f_nitems; i++)
{
if(atom_gettype(argv+i) == A_FLOAT && atom_getfloat(argv+i) == 0)
x->f_items[i] = 0;
else
x->f_items[i] = 1;
}
}
else if(atom_gettype(argv) == A_FLOAT && atom_getfloat(argv) >= 0 && atom_getfloat(argv) < x->f_nitems)
{
for(i = 0; i < x->f_nitems; i++)
x->f_items[(i)] = 0;
x->f_items[(int)atom_getfloat(argv)] = 1;
}
ebox_invalidate_layer((t_ebox *)x, gensym("items_layer"));
ebox_redraw((t_ebox *)x);
}
}
开发者ID:rvega,项目名称:CicmWrapper,代码行数:26,代码来源:c.radio.cpp
示例16: breakpoints_remove
void breakpoints_remove(t_breakpoints *x, t_symbol* s, int argc, t_atom* argv)
{
int index, i;
if(x->f_number_of_points == MAXPOINTS)
return;
if(argc && argv)
{
if(argc == 1 && atom_gettype(argv) == A_FLOAT)
{
index = atom_getfloat(argv);
if(index >= x->f_number_of_points || index < 0)
return;
for(i = index; i < x->f_number_of_points; i++)
{
x->f_point_abscissa[i] = x->f_point_abscissa[i+1];
x->f_point_ordinate[i] = x->f_point_ordinate[i+1];
}
x->f_number_of_points--;
ebox_invalidate_layer((t_ebox *)x, gensym("points_layer"));
ebox_redraw((t_ebox *)x);
}
}
}
开发者ID:avilleret,项目名称:CreamLibrary,代码行数:25,代码来源:c.breakpoints.cpp
示例17: tab_float
static void tab_float(t_tab *x, t_floatarg f)
{
ebox_parameter_setvalue((t_ebox *)x, 1, f, 1);
tab_output(x);
ebox_invalidate_layer((t_ebox *)x, cream_sym_selection_layer);
ebox_redraw((t_ebox *)x);
}
开发者ID:EQ4,项目名称:CreamLibrary,代码行数:7,代码来源:c.tab.cpp
示例18: incdec_mouseup
static void incdec_mouseup(t_incdec *x, t_object *patcherview, t_pt pt, long modifiers)
{
x->f_mouse_down = 0;
clock_unset(x->f_clock);
ebox_invalidate_layer((t_ebox *)x, cream_sym_background_layer);
ebox_redraw((t_ebox *)x);
}
开发者ID:EQ4,项目名称:CreamLibrary,代码行数:7,代码来源:c.incdec.cpp
示例19: carray_buffer_set
t_pd_err carray_buffer_set(t_carray *x, t_eattr *attr, long argc, t_atom* argv)
{
int i;
x->f_array = NULL;
if(argc && argv && atom_gettype(argv) == A_SYM)
{
x->f_name = atom_getsym(argv);
if(!(x->f_array = (t_garray *)pd_findbyclass(x->f_name, garray_class)))
{
x->f_array = NULL;
x->f_name = gensym("(null)");
x->f_buffer_size = 0;
x->f_buffer = NULL;
}
else if(!garray_getfloatarray(x->f_array, &x->f_buffer_size, &x->f_buffer))
{
x->f_array = NULL;
x->f_name = gensym("(null)");
x->f_buffer_size = 0;
x->f_buffer = NULL;
}
else
{
for(i = 0; i < x->f_buffer_size; i++)
post("%f", x->f_buffer[i]);
ebox_invalidate_layer((t_ebox*)x, gensym("buffer_layer"));
ebox_redraw((t_ebox*)x);
}
}
return 0;
}
开发者ID:rvega,项目名称:CicmWrapper,代码行数:32,代码来源:c.array.cpp
示例20: breakpoints_mouseup
void breakpoints_mouseup(t_breakpoints *x, t_object *patcherview, t_pt pt, long modifiers)
{
float abs, ord;
float height = sys_fontheight(ebox_getfontsize((t_ebox *)x)) + 2;
abs = ((pt.x - 3.) / (x->f_size.x - 4.)) * (x->f_range_abscissa[1] - x->f_range_abscissa[0]) + x->f_range_abscissa[0];
ord = ((x->f_size.y - (pt.y - 4.) - 4.) / (x->f_size.y - 4. - height)) * (x->f_range_ordinate[1] - x->f_range_ordinate[0]) + x->f_range_ordinate[0];
x->f_mouse.x = abs;
x->f_mouse.y = ord;
x->f_point_selected = -1;
ebox_invalidate_layer((t_ebox *)x, cream_sym_text_layer);
ebox_invalidate_layer((t_ebox *)x, gensym("points_layer"));
ebox_redraw((t_ebox *)x);
}
开发者ID:avilleret,项目名称:CreamLibrary,代码行数:16,代码来源:c.breakpoints.cpp
注:本文中的ebox_invalidate_layer函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论